Bug 401142 - Color scheme is not properly changed in the panel
Summary: Color scheme is not properly changed in the panel
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-17 18:15 UTC by Filip Fila
Modified: 2019-02-07 15:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.56


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Fila 2018-11-17 18:15:44 UTC
SUMMARY
Sometimes (I am not sure what causes it) switching from a light color scheme to a dark one is not properly reflected on the panel. In the case of Breeze Dark this means that the panel ends up using some light grey color instead of dark grey as it should. The user has to restart plasmashell or log out in order to get the proper color. I believe this is something that has started happening relatively recently.

STEPS TO REPRODUCE
I don't know what exactly triggers the bug because it doesn't happen every time. 

OBSERVED RESULT
You can use the following video with respective timestamps to see what the problem is (make sure the youtube playback bar disappears): 
https://youtu.be/32gyFIWecuw?t=191
https://youtu.be/32gyFIWecuw?t=235

EXPECTED RESULT
The color is updated accurately. 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro
KDE Plasma Version: 5.14.3
KDE Frameworks Version: 5.52.0
Qt Version: 5.11.2
Comment 1 Filip Fila 2018-11-17 18:20:09 UTC
Actually it's probably everything QML that doesn't get updated properly, not just the panel, but I'm not sure.
Comment 2 Filip Fila 2018-12-21 11:12:11 UTC
STEPS TO REPRODUCE:

1. Start the session using a dark color scheme and a color-scheme aware desktop theme (tested with: Adapta Nokto colors and Arc Color & Breeze desktop themes)
2. Switch to a light color scheme (tested with: Breeze)

Outcome - Video 1: https://youtu.be/NdxV_4Ea4jU

Note: attached video shows it's also a bug with the Breeze desktop theme and that Breeze Light behaves fine.

Video 2 shows the same happens when going from light to dark colors: https://youtu.be/egXwb-nalyc
Comment 3 David Edmundson 2018-12-21 13:23:25 UTC
btw, use "plasmashell --replace" instead of killall. It'll save and sync first.
Comment 4 Filip Fila 2018-12-21 17:14:35 UTC
(In reply to David Edmundson from comment #3)
> btw, use "plasmashell --replace" instead of killall. It'll save and sync
> first.

Ah, I had a hunch there was a better way of doing that, thanks :)
Comment 5 Kai Uwe Broulik 2019-02-07 15:38:35 UTC
Git commit 7ca1f01ea91a60b5d88a8e1d8f13ec79c1d2302e by Kai Uwe Broulik.
Committed on 07/02/2019 at 15:37.
Pushed by broulik into branch 'master'.

Do background contrast fallback at runtime

When a theme doesn't supply background contrast values, we take an educated guess based on whether it's a dark or light theme.
We didn't update the values when switching only color schemes at runtime (when theme follows it).
This lead to washed out Plasma popup and panel backgrounds. Instead, compute the fallback value at runtime.
Also, while at it, update complimentary colorscheme as well, which was forgotten here.

Differential Revision: https://phabricator.kde.org/D18487

M  +6    -20   src/plasma/private/theme_p.cpp
M  +20   -0    src/plasma/theme.cpp

https://commits.kde.org/plasma-framework/7ca1f01ea91a60b5d88a8e1d8f13ec79c1d2302e