Bug 417461 - KCM Color shouldn't use generic GTK CSS color classes
Summary: KCM Color shouldn't use generic GTK CSS color classes
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_colors (show other bugs)
Version: 5.17.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 413296 417412 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-02-11 23:35 UTC by Ongun Kanat
Modified: 2020-02-24 04:39 UTC (History)
7 users (show)

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


Attachments
Screenshot for Clearlooks Phenix (129.53 KB, image/png)
2020-02-11 23:35 UTC, Ongun Kanat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ongun Kanat 2020-02-11 23:35:52 UTC
Created attachment 125876 [details]
Screenshot for Clearlooks Phenix

SUMMARY
While using theme_ for a uniform look between GTK and KDE it leads unintended results. Not every GTK theme is designed to support colors but some of them still use theme_* items which causes some GTK themes to break.

My proposed solution is using a completely different naming scheme (if GTK3 allows this) for Breeze-gtk and modifying kcm_color accordingly KDE's @define-color items can have some prefix like kde_theme_fg_color in ~/.config/colors.css file.

STEPS TO REPRODUCE
1. Choose Breeze dark in kcm_color
2. Install gtk3-widget-factory
3. Download latest release Clearlooks-Phenix ( https://github.com/jpfleury/clearlooks-phenix )
4. Extract contents in a folder under ~/.themes . I will rename the top level directory that contains index.theme as clearfoo
5. Run GTK_THEME=clearfoo gtk3-widget-factory

OBSERVED RESULT
Breeze-dark colors set in ~/.config/gtk-3.0/colors.css override some of the colors of Clearlooks Phenix and break the theme.


EXPECTED RESULT
GTK themes other than the ones strive for KDE compatibility shouldn't be affected by KDE's color settings.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1

ADDITIONAL INFORMATION
GTK version: 3.24.11
Comment 1 Nate Graham 2020-02-15 03:26:07 UTC
Carson, is this feasible?
Comment 2 Nate Graham 2020-02-15 17:59:34 UTC
*** Bug 417412 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2020-02-15 18:09:18 UTC
We're working on it. See https://phabricator.kde.org/D27426.
Comment 4 Janet Blackquill 2020-02-22 17:57:35 UTC
Git commit dca25cb44b37458506f7455469829f8da115ee69 by Carson Black.
Committed on 22/02/2020 at 17:57.
Pushed by cblack into branch 'master'.

[GTK3] Rename colour definitions

Summary:
Colour definitions are now suffixed with _breeze, and public API colours
are now reexported variables.

Test Plan:
In tandem with D27426, no visual effect should
be noticeable on Breeze GTK.

Other themes should display an improvement:

Before: {F8105241}
After: {F8105244}

Reviewers: #breeze, ngraham

Reviewed By: #breeze, ngraham

Subscribers: plasma-devel

Tags: #plasma

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

M  +108  -81   src/_colors.scss
M  +2    -2    src/_functions.scss
M  +5    -5    src/gtk3/widgets/_base.scss
M  +2    -2    src/gtk3/widgets/_entry.scss
M  +1    -1    src/gtk3/widgets/_headerbar.scss
M  +9    -9    src/gtk3/widgets/_infobar.scss
M  +1    -1    src/gtk3/widgets/_link.scss
M  +5    -5    src/gtk3/widgets/_notebook.scss
M  +3    -3    src/gtk3/widgets/_progressbar.scss
M  +2    -2    src/gtk3/widgets/_scale.scss
M  +2    -2    src/gtk3/widgets/_scrollbar.scss
M  +2    -2    src/gtk3/widgets/_switch.scss
M  +3    -3    src/gtk3/widgets/_treeview.scss

https://commits.kde.org/breeze-gtk/dca25cb44b37458506f7455469829f8da115ee69
Comment 5 Janet Blackquill 2020-02-22 18:09:21 UTC
Git commit fffb352cfa1eb5e18f038d5b423d2dce0dca8727 by Carson Black.
Committed on 22/02/2020 at 18:09.
Pushed by cblack into branch 'master'.

[KRDB] Rename GTK colours to be exported

Summary:
The colours exported by KRDB for GTK now have the _breeze suffix.
FIXED-IN: 5.19

Test Plan: In tandem with D27425, no visual change should be expected.

Reviewers: #plasma, ngraham

Reviewed By: ngraham

Subscribers: ongunkanat, plasma-devel

Tags: #plasma

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

M  +77   -77   kcms/krdb/krdb.cpp

https://commits.kde.org/plasma-desktop/fffb352cfa1eb5e18f038d5b423d2dce0dca8727
Comment 6 Gabriel Fernandes 2020-02-22 18:54:02 UTC
Wow, this is awesome.
This renaming should fix bugs like https://bugs.kde.org/show_bug.cgi?id=413296
Because several themes use variables for colors (like arc gtk), and "theme_fg_color" gets overrided by the kde color, then breaking the themes
Comment 7 Nate Graham 2020-02-22 22:47:44 UTC
I don't see that this fully fixes Bug 412331. Can you confirm?
Comment 8 Gabriel Fernandes 2020-02-24 00:39:31 UTC
I don't know if this fixes that issue, as the application he shows with the problem is probably gtk2 (Inkscape).
But this one https://bugs.kde.org/show_bug.cgi?id=413296 it should fix, if this patch is doing what I think it is doing.
Comment 9 Nate Graham 2020-02-24 04:39:47 UTC
*** Bug 413296 has been marked as a duplicate of this bug. ***