ubports / ubuntu-ui-toolkit

Moved to https://gitlab.com/ubports/core/lomiri-ui-toolkit
https://gitlab.com/ubports/core/lomiri-ui-toolkit
GNU Lesser General Public License v3.0
13 stars 21 forks source link

Pickers hard to see in Surudark #92

Closed taiebot closed 3 years ago

taiebot commented 4 years ago

See the following screenshot. screenshot20200830_165903499

cibersheep commented 4 years ago

Thanks. I'll take a loot at this

mymike00 commented 3 years ago

I was digging into this and I found out that the issue is not that straight-forward to fix as I thought.

  1. highlightBackgroundColor needs to be set to theme.palette.normal.background or whatever themed color
  2. the HighlightMagnifier that changes color to the text or icon that is highlighted, changes (idk why) the color of the highlight Rectangle: it applies a mask that is the same color of highlightColor and opacity that is a function of the brightness of highlightColor. If highlightColor 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...

cibersheep commented 3 years ago

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.

UniversalSuperBox commented 3 years ago

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.