[Lock & Login Screens] Don't use a black shadow with black text
ClosedPublic

Authored by filipf on Oct 28 2019, 7:45 AM.

Details

Summary

This patch fixes the clock's black shadow when the text is black, which happens with some Plasma themes and color schemes.

BUG: 413537
FIXED-IN: 5.17.2

Test Plan

To test either:

  1. get a Plasma theme like Arc Color or Matcha Color and use it with a light color scheme such as Breeze
  2. override colorGroup in the same file to be PlasmaCore.Theme.NormalColorGroup and test with the Breeze Plasma theme and Breeze color scheme

For the login screen you'll have to do the same or similar as above and then use the sync function in the sddm kcm.

Before:

After:

Diff Detail

Repository
R120 Plasma Workspace
Branch
black-text-no-black-shadow (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18245
Build 18263: arc lint + arc unit
filipf created this revision.Oct 28 2019, 7:45 AM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 28 2019, 7:45 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
filipf requested review of this revision.Oct 28 2019, 7:45 AM
filipf edited the test plan for this revision. (Show Details)Oct 28 2019, 7:46 AM
filipf added reviewers: Plasma, VDG, ngraham.
broulik added inline comments.
lookandfeel/contents/lockscreen/LockScreenUi.qml
37

Would it make more sense to use hsvValue or hslLightness?

filipf edited the summary of this revision. (Show Details)Oct 28 2019, 7:52 AM
filipf edited the test plan for this revision. (Show Details)
filipf added inline comments.
lookandfeel/contents/lockscreen/LockScreenUi.qml
37
filipf edited the test plan for this revision. (Show Details)Oct 28 2019, 7:54 AM
filipf updated this revision to Diff 68868.Oct 28 2019, 8:06 AM

also apply the same fix to the login screen

filipf retitled this revision from [Lock Screen] Don't use black shadows with black text to [Lock & Login Screens] Don't use a black shadow with black text.Oct 28 2019, 8:07 AM
filipf edited the test plan for this revision. (Show Details)
ndavis accepted this revision.Oct 28 2019, 9:46 AM
This revision is now accepted and ready to land.Oct 28 2019, 9:46 AM

Admittedly this doesn't look super fortuate either when the wallpaper is darker:

But legibility is really poor unless we do something:

Another thing we could do is have the text be white when there is no lock screen UI:

That's kind of distracting though.

I think we have a greater conceptual problem here. If the lock and login screens are able to display arbitrary text colors from the user's color scheme, we will never be rid of these kinds of problems. I see two practical solutions:

  • Hardcode white as the text color and black as the shadow color and don't respect the color scheme
  • Tweak the ui yet again (ugh) to replace the text shadows with rounded rectangles using a contrasting color from the color scheme

Otherwise we will be playing whack-a-mole forever, and will have to live with really ugly results for many cases (e.g. the case where the blurred wallpaper becomes lightened and the text is dark).

Yeah there is a conceptual issue here we need to look into solving. IMO we should just always have white UI elements and the background dimmed.

As for solutions, I've already looked into hardcoding everything as white (+bg dimmed). It's easy to fix the wallpaper fader and labels, but unfortunately I think it's a dead end because the rest would involve porting PlasmaCore.IconItem to Kirigami.Icon and PC2.ToolButton to QQC2.ToolButton. Those two would have to be used because the former don't have a color property that can be set (the PC3.ToolButton has one but it doesn't work). I would assume the ports would cause objection since they would entail using desktop components in the shell.

Regardless of what we come up with, I made this as a small fix for 5.17 while we rethink things for 5.18 and further.

ngraham accepted this revision.Oct 28 2019, 2:47 PM

All right let's do this as a targeted fix for 5.17.

fvogt added a subscriber: fvogt.Oct 28 2019, 6:37 PM

I think we have a greater conceptual problem here. If the lock and login screens are able to display arbitrary text colors from the user's color scheme, we will never be rid of these kinds of problems. I see two practical solutions:

  • Hardcode white as the text color and black as the shadow color and don't respect the color scheme

Or if there is no complementary text color in the color scheme, just create one based on the text color's brightness?

This revision was automatically updated to reflect the committed changes.