Bug 438110

Summary: Editing color scheme without changing color scheme doesn't update GTK3 app colors
Product: [Applications] systemsettings Reporter: nyanpasu64 <nyanpasu64>
Component: kcm_colorsAssignee: Plasma Bugs List <plasma-bugs>
Status: CONFIRMED ---    
Severity: normal CC: jpwhiting, mail, mwoehlke.floss, nate, sonichedgehog_hyperblast00
Priority: NOR    
Version: 5.21.90   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=456874
Latest Commit: Version Fixed In:
Sentry Crash Report:

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.
Comment 2 Akseli Lahtinen 2024-09-17 10:03:10 UTC
*** Bug 456874 has been marked as a duplicate of this bug. ***