Bug 438110 - Editing color scheme without changing color scheme doesn't update GTK3 app colors
Summary: Editing color scheme without changing color scheme doesn't update GTK3 app co...
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_colors (show other bugs)
Version: 5.21.90
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-05 10:59 UTC by nyanpasu64
Modified: 2022-07-18 20:37 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nyanpasu64 2021-06-05 10:59:35 UTC
SUMMARY
If you edit a color scheme, press Apply in the KColorSchemeEditor dialog, then press Apply in the main Colors settings page, GTK3 apps don't get the updated colors.

STEPS TO REPRODUCE
1. Open the Colors settings page (eg. kcmshell5 colors).
2. Click the Edit button on an existing color scheme. In the dialog, "Save As" a new name and close the dialog. In the main window, click the new color scheme and press Apply.
3. Click the Edit button on the new color scheme. In the dialog, change some colors, press Apply, and close the dialog. In the main window, press Apply.
4. Open some GTK3 apps. (This can be done before or after step 3.)

OBSERVED RESULT
The new colors do not appear in the GTK3 app, because they are not written to ~/.config/gtk-3.0/colors.css. The file is only rewritten when you open the Colors settings page, switch to a different color scheme name, and press Apply.

EXPECTED RESULT
~/.config/gtk-3.0/colors.css is rewritten when you edit a theme and apply the edited theme to Qt apps.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Kernel Version: 5.12.9-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GT 730/PCIe/SSE2

ADDITIONAL INFORMATION
Why do you have to first edit and apply a theme, then apply the edited theme to Qt apps? It's an odd UI choice perhaps from legacy code.

This issue is somewhat related to https://bugs.kde.org/show_bug.cgi?id=421745, in that if we properly rewrite colors.css, we must notify GTK apps as well. Hopefully the fixes for that issue will compose with the fix to this issue.
Comment 1 Nate Graham 2021-06-09 16:31:29 UTC
Interesting, can confirm.

Legacy code indeed. We've been meaning to overhaul the color scheme editor functionality for quite some time.