Created attachment 145598 [details] Screenshot of konsole with the correct colors, lutris(GTK3) being themed correctly and the gtk4 demo not picking the colors even through it is ran with GTK_THEME=Breeze-Dark SUMMARY If I use a non standard color theme the Breeze gtk 3 theme will take those colors but not the Breeze gtk 4 theme STEPS TO REPRODUCE 1. Change color theme 2. Run a gtk 3 app and see it as it respect the color theme 3. Run a gtk 4 app and see as it does not respect the color theme OBSERVED RESULT EXPECTED RESULT Gtk 4 Breeze theme respect the color theme like gtk 3 Breeze color theme SOFTWARE/OS VERSIONS Operating System: NixOS 22.05 KDE Plasma Version: 5.23.3 KDE Frameworks Version: 5.87.0 Qt Version: 5.15.3 Kernel Version: 5.15.4 (64-bit) Graphics Platform: X11 Graphics Processor: AMD RENOIR ADDITIONAL INFORMATION
The technology we use to re-color apps (hot-pluggable GTK modules) was removed by the GTK developers. We tried to talk to the GTK developers about this but did not get anywhere. They were quite adamantly opposed to our use case (dynamically re-coloring apps at runtime using theming) and did not seem to have any interest in working to support it again. So we will have to find another way to do it, or else live with this feature being broken forever. :(
Weirdly it still did work on X11 I think
(In reply to Nate Graham from comment #1) > The technology we use to re-color apps (hot-pluggable GTK modules) was > removed by the GTK developers. We tried to talk to the GTK developers about > this but did not get anywhere. They were quite adamantly opposed to our use > case (dynamically re-coloring apps at runtime using theming) and did not > seem to have any interest in working to support it again. > > So we will have to find another way to do it, or else live with this feature > being broken forever. :( Isn't the technology used to recolor GTK apps just a CSS file with a list of color definitions used by the Breeze GTK theme, updated by kde-gtk-config on color scheme change? There's no recoloring module in any GTK3 Flatpak app, yet recoloring works just fine in those. You just have to restart GTK3 Flatpak apps if you change color, and I thought the GTK module was just for *that*. The *real* problem is that kde-gtk-config does absolutely nothing with regards to GTK4 configuration at the moment, even though the GTK4 theme supports the same set of colors as the GTK3 theme. At least, as far as I can tell, it does absolutely nothing. Searching kded/configeditor.cpp in the source for "gtk-3.0" gives plenty of hits, but absolutely nothing for "gtk-4.0". Quizzically, the codebase seems to have a recent commit to not use options deprecated in GTK4, but doesn't actually write any GTK4 files at all. You can probably work around this problem by linking all of the xdg-config/gtk-3.0 files into xdg-config/gtk-4.0. From here, it's just a hop and a skip to recoloring Adwaita applications if we wanted to.
Yes, we can do custom CSS but as far as I;m aware, it won't update at runtime like we currently have; you'll need to restart your GTK apps to see changes. Someone who's familiar with GTK needs to work on this to make it happen.
> Yes, we can do custom CSS but as far as I;m aware, it won't update at runtime like we currently have; you'll need to restart your GTK apps to see changes. Someone who's familiar with GTK needs to work on this to make it happen. I may be misinterpreting the intention of your reply here; the vibe I'm getting is that if we can't have hot-reloading, you don't feel that this issue is worth addressing anyways. I'm not inclined to think you actually feel this way. Lack of hot-reloading and needing to restart GTK applications so that they reload gtk.css is a small inconvenience compared to not having the theme follow your colors *at all*, unless you have one of those setups that automatically changes the colors periodically. But that type of setup is already broken by apps that can't use the colorreload module anyways. Anyways, for a fix for this issue to be submitted upstream to kde-gtk-config, what do you think would be better? Writing identical files to the gtk-4.0 directory at the same time as writing to the gtk-3.0 directory, or simply creating a symlink in the gtk-4.0 directory to the relevant files in the gtk-3.0 directory? Should this part of the discussion take place elsewhere?
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kde-gtk-config/-/merge_requests/45
Git commit 30898d4731ec99d7903b3f5b33ef6eda8067af01 by Nate Graham, on behalf of Trent McPheron. Committed on 09/09/2022 at 14:36. Pushed by ngraham into branch 'master'. Also write CSS and assets to xdg-config/gtk-4.0 The GTK4 version of Breeze doesn't inherit color scheme at all without this. FIXED-IN: 5.26 M +46 -33 kded/configeditor.cpp M +2 -0 kded/configeditor.h https://invent.kde.org/plasma/kde-gtk-config/commit/30898d4731ec99d7903b3f5b33ef6eda8067af01