Bug 449985 - Drop Shadows on the lock screen are inconsistent between light and dark mode.
Summary: Drop Shadows on the lock screen are inconsistent between light and dark mode.
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Theme - Breeze (show other bugs)
Version: 5.24.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: 1.0
Assignee: visual-design
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-11 01:18 UTC by Unknown
Modified: 2022-02-17 19:24 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.2
Sentry Crash Report:


Attachments
dark mode screenshot. (41.92 KB, image/png)
2022-02-11 01:19 UTC, Unknown
Details
light mode screenshot. (45.82 KB, image/png)
2022-02-11 01:20 UTC, Unknown
Details
Settings windows to change from dark to light. (172.06 KB, image/png)
2022-02-12 01:45 UTC, Unknown
Details
global themes screenshots (146.20 KB, image/png)
2022-02-12 01:45 UTC, Unknown
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2022-02-11 01:18:56 UTC
Drop Shadows on the lock screen are inconsistent between light and dark mode.

STEPS TO REPRODUCE
1. Open systemsettings and click "dark".
2. Lock your screen.
3. Wait until password prompt disappears.
4. Observer the drop shadow on date and time text
5. Unlock screen and open systemsettings. Then click "light".
6. Lock your screen.
7. Wait until password prompt disappears.
8. Observer the drop shadow on date and time text again

OBSERVED RESULT
The drop shadow in the dark theme is much stronger

EXPECTED RESULT
Both drop shadows are the same

SOFTWARE/OS VERSIONS
Linux/KDE Plasma
KDE Plasma Version: 5.24.0  
KDE Frameworks Version:  5.90.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Occurs with Xorg and Wayland. I am using the default "Breeze" theme.
Comment 1 Unknown 2022-02-11 01:19:59 UTC
Created attachment 146564 [details]
dark mode screenshot.
Comment 2 Unknown 2022-02-11 01:20:35 UTC
Created attachment 146565 [details]
light mode screenshot.
Comment 3 Nate Graham 2022-02-11 21:56:29 UTC
That is extremely strange.

Can you try to pinpoint which kind of theme change causes it? For example:
1. Does it happen when your Plasma style is set to "Breeze" and you switch between the "Breeze Light" and "Breeze Dark" color schemes?
2. Does it happen when you switch between the "Breeze Light" and "Breeze Dark Plasma styles?
Comment 4 Unknown 2022-02-12 01:43:35 UTC
INSTRUCTION TO CHANGE TO DARK/LIGHT MODE
1. open systemsettings
2. click on the home icon (this should go to the "Quick settings" section)
3. Choose Light or Dark from the top of the window.

When I choose dark mode, the global theme changes "Breeze-dark". When I chose light mode, the global theme is "Breeze". I changed anything else under "Appearance", "Lock Screen", or "SDDM"
Comment 5 Unknown 2022-02-12 01:45:00 UTC
Created attachment 146614 [details]
Settings windows to change from dark to light.

Settings windows to change from dark to light.
Comment 6 Unknown 2022-02-12 01:45:40 UTC
Created attachment 146615 [details]
global themes screenshots

When I select "Light" from quick settings, the global theme changes to "Breeze"
Comment 7 Unknown 2022-02-13 21:32:15 UTC
I can reproduce on 3 other installations of KDE plasma on arch linux.
Comment 8 Nate Graham 2022-02-14 18:43:45 UTC
For testing purposes, don't use the Global Theme choosers on the Quick Settings and Global Theme pages. Instead, change the Plasma themes and color schemes manually, like so:

1. Set your Plasma style to "Breeze" in the Plasma Style page, and then switch between the "Breeze Light" and "Breeze Dark" color schemes. Does it still happen in this case?

Switch between the "Breeze Light" and "Breeze Dark Plasma styles on the Plasma style page. Does it still happen in this case?
Comment 9 Unknown 2022-02-17 05:10:18 UTC
Sorry for the late response, I was busy with work.

> Set your Plasma style to "Breeze" in the Plasma Style page, and then switch between the "Breeze Light" and "Breeze Dark" color schemes. > Does it still happen in this case?

Yes, the shadows change in this case

> Switch between the "Breeze Light" and "Breeze Dark" Plasma styles on the Plasma style page. Does it still happen in this case?

Yes, it also happens this way. I had the color scheme set to "Breeze-Dark" while doing this
Comment 10 Nate Graham 2022-02-17 18:05:15 UTC
Thanks, that's helpful. I've discovered that we do in fact have special code to try to make the shadows smaller when the background is light.

However its definition of "when background is light" is rather faulty; we simply look at the lightness or darkness of the default text color, rather than the actual background image itself. This seems wrong, and it's why the shadows change for you when you switch between color schemes or plasma themes but the background remains the same.

But even if we fixed that, I am somewhat unconvinced that this code is needed at all. If the actual background image is light, making the shadows smaller could reduce readability. This code seems like a solution in search of a problem, and I will propose removing it.
Comment 11 Bug Janitor Service 2022-02-17 18:27:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1470
Comment 12 Nate Graham 2022-02-17 19:23:21 UTC
Git commit 146ef22fcbdaf8bc4648e1fb29a6415a524f83dd by Nate Graham.
Committed on 17/02/2022 at 18:25.
Pushed by ngraham into branch 'master'.

Lock/login themes: stop adjusting shadows based on color scheme

Right now we change the intensity of shadows based on the color scheme's
text color, but with a property called "lightBackground". This indicates
that we wanted to do it based on the background color itself, but did
not or could not, so settled on using the text color as a proxy. However
this is wrong; there is no relationship between the active color
scheme's text color and the color of the background image.

Even if we could or did fix that, it would probably still be wrong,
because using lighter shadows on a genuinely light background would
result in worse contrast and readability, especially if the light
background was very visually busy.

For these reasons, in most other places, we have since settled on the
mantra of "shadows should be black", and this commit makes the lock and
login screens follow that convention as well.
FIXED-IN: 5.24.2

M  +1    -7    lookandfeel/contents/lockscreen/LockScreenUi.qml
M  +2    -13   sddm-theme/Main.qml

https://invent.kde.org/plasma/plasma-workspace/commit/146ef22fcbdaf8bc4648e1fb29a6415a524f83dd
Comment 13 Nate Graham 2022-02-17 19:24:01 UTC
Git commit a31e4ce4ec4c0a7083b9bdfa962dafec4ac8f784 by Nate Graham.
Committed on 17/02/2022 at 19:23.
Pushed by ngraham into branch 'Plasma/5.24'.

Lock/login themes: stop adjusting shadows based on color scheme

Right now we change the intensity of shadows based on the color scheme's
text color, but with a property called "lightBackground". This indicates
that we wanted to do it based on the background color itself, but did
not or could not, so settled on using the text color as a proxy. However
this is wrong; there is no relationship between the active color
scheme's text color and the color of the background image.

Even if we could or did fix that, it would probably still be wrong,
because using lighter shadows on a genuinely light background would
result in worse contrast and readability, especially if the light
background was very visually busy.

For these reasons, in most other places, we have since settled on the
mantra of "shadows should be black", and this commit makes the lock and
login screens follow that convention as well.
FIXED-IN: 5.24.2


(cherry picked from commit 146ef22fcbdaf8bc4648e1fb29a6415a524f83dd)

M  +1    -7    lookandfeel/contents/lockscreen/LockScreenUi.qml
M  +2    -13   sddm-theme/Main.qml

https://invent.kde.org/plasma/plasma-workspace/commit/a31e4ce4ec4c0a7083b9bdfa962dafec4ac8f784