Replace hardcoded gradient rectangles in scrollable widgets with NFadeMask abstraction#2386
Replace hardcoded gradient rectangles in scrollable widgets with NFadeMask abstraction#2386BUSTheid wants to merge 8 commits intonoctalia-dev:mainfrom
Conversation
6313e8c to
6ad498e
Compare
f53a102 to
fda10ac
Compare
|
@ItsLemmy fixed some missing control over the fade in NScrollText, prototyped a pretty ugly solution for NScrollView - I'll try to simplify it if possible. Let me know what you think about the direction. Maybe we can consider making the fade rectangle its own individual .qml or script to create dynamically everywhere we want on any part of the UI, to minimize boilerplate? |
3ebff60 to
5fc20f7
Compare
Wrapping an Item around the white gradient rectangle allows vertical control over the masked content, matching rectangle's sizes, since maskSource always gets stretched to match the source size. That way, the white gradient rectangle itself does not get stretched, only the Item, so content drawn outside of its boundaries properly read the maskSource opacity as 0, vertically as well. Also fixes the possibility of text rendering over the border at high Font sizes, which was the initial purpose of the refactor, but got overseen.
5fc20f7 to
11385e9
Compare
Ported NScrollText Ported NScrollView
|
@notiant most recent commit should fix this, and added the animation for the fade appearing when the scrolling starts. Let me know if you find anything else, it's SO MANY elements that got refactored indirectly hah |
So after testing this a bit more I don't really see any fading mask in NScrollView (like the network or notification history panel)? |
Notification history for me in particular does apply the fade, it's maybe too small on different scale values? NFadeMask does assign a property that can be used to increase/decrease the size of the fade. API should be there and working, whether it gets changed in N* elements or particularly in a larger scope QML file. (I'm trash at design, but really enjoyed porting into a centralized solution kek) |


Pull Request
Motivation
Introduction of NFadeMask - reusable mask source component that centralises the fade rectangle + MultiEffect pattern and ports all affected widgets to use it.
Type of Change
Testing
Checklist