Pickers hard to see in Surudark
Closed this issue · 4 comments
Thanks. I'll take a loot at this
I was digging into this and I found out that the issue is not that straight-forward to fix as I thought.
highlightBackgroundColor
needs to be set totheme.palette.normal.background
or whatever themed color- the
HighlightMagnifier
that changes color to the text or icon that is highlighted, changes (idk why) the color of the highlightRectangle
: it applies a mask that is the same color ofhighlightColor
and opacity that is a function of the brightness ofhighlightColor
. IfhighlightColor
is black the Rectangle's color is untouched. If it's white, the Rectangle becomes white too. If it's grey, the Rectangle color becomes lighter
Now, I know absolute nothing about how ShaderEffectSource
and HighlightMagnifier
work so Idk how to continue the work here...
The ShaderEffectSource
says it takes only the item view
to transform it into a texture, but actuallythe whole highlightItem
is affected by the HighlightMagnifier
, which has as input the texture produced by the ShaderEffectSource
...
The Clock uses different values (Which is not perfect as the DatePicker looks quite different in Ambiance than in SuruDark):
https://gitlab.com/ubports/apps/clock-app/-/blob/master/app/alarm/EditAlarmPage.qml#L239
a similar fix for the Calendar (which uses a custom DatePicker):
https://gitlab.com/ubports/apps/calendar-app/-/blob/master/qml/CustomPickers/1.0/PickerPanel.qml#L179
Instead of hard-coding jet / black, should we change those for normal.raisedText
?
Shader Effects are explained here: https://doc.qt.io/qt-5/qml-qtquick-shadereffect.html
Do you have a suggestion? Do you need me to take some to look into the Item... I'm a bit slowminded now but I could take some time to test it if you want.
Ubuntu UI Toolkit has moved to https://gitlab.com/ubports/core/lomiri-ui-toolkit. If this issue is still relevant, please file it again at https://gitlab.com/ubports/core/lomiri-ui-toolkit/-/issues.