Bug 377935 - Wrong system colors substituted in color-scheme-aware plasma themes
Summary: Wrong system colors substituted in color-scheme-aware plasma themes
Status: RESOLVED FIXED
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: libplasma (show other bugs)
Version: 5.79.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-22 15:21 UTC by Andreas
Modified: 2022-06-11 01:19 UTC (History)
6 users (show)

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


Attachments
screenshot (871.60 KB, image/png)
2017-03-24 09:20 UTC, Andreas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas 2017-03-22 15:21:45 UTC
Background:
Plasma has the ability to use colors from the system color scheme, as described here:
https://techbase.kde.org/Development/Tutorials/Plasma5/ThemeDetails#Using_system_colors

Steps to reproduce the bug:
1) Choose an application color scheme with gray window background, and white view background, as would be common
2) Choose a plasma theme that makes use of ColorScheme-ViewBackground (for example: https://store.kde.org/p/1157516/ - it uses ColorScheme-Background for most widgets, but ColorScheme-ViewBackground for the clock face)

Result:
The clock face is gray (ColorScheme-Background)

Expected behaviour:
The clock face is white (ColorScheme-ViewBackground)

The following colors seem to be wrong:
'ColorScheme-Background' is used where 'ColorScheme-ViewBackground' is specified
'ColorScheme-Text' is used where 'ColorScheme-ViewText' is specified


This constitutes a regression, it worked the expected way in plasma 4


regard,
Andi
Comment 1 Marco Martin 2017-03-23 16:30:06 UTC
you mean the analog clock? i get it white exactly as the screenshot
Comment 2 Andreas 2017-03-24 09:20:16 UTC
Created attachment 104715 [details]
screenshot

i added a screenshot to illustrate what i mean
Comment 3 Andreas 2017-04-04 16:00:08 UTC
Marco:
Can you confirm that you get the clock face white even when using a non-white color for "Window Background" in the application color scheme?
Comment 4 Alexander Mentyu 2017-11-23 18:15:43 UTC
Is this still relevant? Analog clock has а different design on my system
Comment 5 Andreas 2017-12-10 10:34:12 UTC
Alexander: yes, however:

through some more trial, i found that ColorScheme-ButtonBackground (and not ColorScheme-Background, as i previously reported) is used where ColorScheme-ViewBackground should be used
Comment 6 Andreas 2017-12-10 10:35:34 UTC
also, my theme (QTStep) no longer serves as an example for this issue, i hardcoded the colors in that theme as a workaround for this bug.
Comment 7 Kai Uwe Broulik 2018-01-03 13:58:16 UTC
This seems to be an intentional "compatibility" workaround:

If the X-Plasma-API specified in the metadata.desktop (a key I couldn't find anywhere in the docs..) is smaller than 5.0 (or not present) then it will "fall back" to using ButtonColorGroup for anything other than NormalColorGroup

    //Before 5.0 Plasma theme really only used Normal and Button
    //many old themes are built on this assumption and will break
    //otherwise
    if (apiMajor < 5 && group != Theme::NormalColorGroup) {
        group = Theme::ButtonColorGroup;
    }
Comment 8 Bug Janitor Service 2022-06-09 22:41:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/547
Comment 9 Ismael Asensio 2022-06-11 01:19:49 UTC
Git commit d444c3452082a6afa1c7975de25180b7cfede818 by Ismael Asensio.
Committed on 09/06/2022 at 22:38.
Pushed by iasensio into branch 'master'.

breeze/widgets: Make analog clock follow colorscheme

Now the breeze analog clock is colorscheme aware and follows
the user preferences, either for white or dark schemes.

Also make the seconds hand use accent color
FIXED-IN: 5.96

M  +23   -16   src/desktoptheme/breeze/widgets/clock.svg

https://invent.kde.org/frameworks/plasma-framework/commit/d444c3452082a6afa1c7975de25180b7cfede818