Bug 456648 - Color scheme previews pull disabled text and hovered button border colors from the active color scheme
Summary: Color scheme previews pull disabled text and hovered button border colors fro...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_colors (show other bugs)
Version: 5.25.2
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Janet Blackquill
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-12 18:17 UTC by Nagy Tibor
Modified: 2022-07-22 23:43 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.25.4


Attachments
Screenshot (160.72 KB, image/png)
2022-07-12 18:17 UTC, Nagy Tibor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nagy Tibor 2022-07-12 18:17:34 UTC
Created attachment 150567 [details]
Screenshot

SUMMARY
The color scheme previews at the Colors KCM are inaccurate. They pull the disabled text color and the hovered button border colors from the currently applied color scheme, not from their own.

STEPS TO REPRODUCE
1. Open System Settings -> Appearance -> Global Theme -> Colors
2. Create a new color scheme where you change the following colors to something noticeable, for example radioactive green:
    - Common Colors -> Inactive Text
    - Common Colors -> Selection Background
3. Apply the modified theme

OBSERVED RESULT
See the attachment.

EXPECTED RESULT
Color previews should pull these colors from their own palette, not from the currently active color scheme.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.25
KDE Plasma Version: 5.25.2
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Graphics Platform: X11
Comment 1 Nate Graham 2022-07-13 20:20:35 UTC
lol can reproduce
Comment 2 Nate Graham 2022-07-13 20:33:41 UTC
It seems like the problem is somewhere here: https://invent.kde.org/plasma/plasma-workspace/-/blob/master/kcms/colors/package/contents/ui/main.qml#L402

After a few tries, I can't figure out what it is though.
Comment 3 Janet Blackquill 2022-07-13 20:56:09 UTC
Oops, this looks like it'll definitely be harder than it would initially seem to fix due to the nature of how we're passing colours to QML and how that interacts with modifier states like disabled and hovered. On it, though.
Comment 4 Nate Graham 2022-07-13 20:57:03 UTC
Awesome, thanks!
Comment 5 Bug Janitor Service 2022-07-16 00:41:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1927
Comment 6 Nate Graham 2022-07-22 22:46:50 UTC
Git commit 7a1c40672ccfc9827b2ebd278849bffbad87973d by Nate Graham, on behalf of Jan Blackquill.
Committed on 22/07/2022 at 22:36.
Pushed by ngraham into branch 'master'.

kcms/colors: make sure the preview uses the right colours

M  +3    -0    kcms/colors/colorsmodel.cpp
M  +1    -0    kcms/colors/colorsmodel.h
M  +3    -0    kcms/colors/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/commit/7a1c40672ccfc9827b2ebd278849bffbad87973d
Comment 7 Nate Graham 2022-07-22 23:42:59 UTC
Git commit 21905cfe068326ccc5763b373ec5e6c796f1586d by Nate Graham, on behalf of Jan Blackquill.
Committed on 22/07/2022 at 23:42.
Pushed by ngraham into branch 'Plasma/5.25'.

kcms/colors: make sure the preview uses the right colours


(cherry picked from commit 7a1c40672ccfc9827b2ebd278849bffbad87973d)

M  +3    -0    kcms/colors/colorsmodel.cpp
M  +1    -0    kcms/colors/colorsmodel.h
M  +3    -0    kcms/colors/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/commit/21905cfe068326ccc5763b373ec5e6c796f1586d