Bug 448877 - kde-gtk-config doesn't work as expected when switching preferred color scheme.
Summary: kde-gtk-config doesn't work as expected when switching preferred color scheme.
Status: CONFIRMED
Alias: None
Product: Breeze
Classification: Plasma
Component: gtk theme (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Janet Blackquill
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-21 13:03 UTC by Emilio Cobos Álvarez (:emilio)
Modified: 2022-06-10 20:14 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
firefox-nightly-log.txt (95.96 KB, text/plain)
2022-01-21 15:58 UTC, Bharadwaj Raju
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emilio Cobos Álvarez (:emilio) 2022-01-21 13:03:40 UTC
SUMMARY

See the discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1734934#c17 and following. STR are just having Firefox or other GTK apps with the breeze theme and switching color-scheme.

I think there are various issues in the kde-gtk-module:

 * I _think_ `ConfigEditor::addImportStatementsToGtkCssUserFile` is unnecessary, since the colorreload module will also load the colors.css file. Worse, it prevents colorreload from actually doing its job, since the `gtk.css` loaded statements won't be removed. This causes Firefox and other GTK apps need a full restart to see theme changes.

 * `GtkConfig::setDarkThemePreference` is not harmful, but seems redundant with the newer portal-based settings.

 * The default Breeze theme doesn't react to the `gtk-application-prefer-dark-theme` setting, since it will use the colors from `colors.css` unconditionally.

All these issues cause GTK apps seem less polished than they should, even though there's nothing those apps can realistically do to avoid it.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 36
KDE Plasma Version: 5.23.90
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.17.0-0.rc0.20220112gitdaadb3bd0e8d.63.fc36.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 1 Bharadwaj Raju 2022-01-21 15:58:52 UTC
Created attachment 145717 [details]
firefox-nightly-log.txt

Log of what Firefox Nightly outputs with MOZ_LOG=LookAndFeel:5 as I change the colorscheme back and forth. Might be useful. Done on nonexistent profile.
Comment 2 Nate Graham 2022-05-17 19:01:07 UTC
Please feel free to submit merge requests to fix these issues, Emilio!
Comment 3 Emilio Cobos Álvarez (:emilio) 2022-05-20 11:21:21 UTC
Yeah, happy to, it's on my list of things to get to. I realized it's a bit trickier because on Wayland GTK doesn't load the colorreload module, so it's not so straight-forward unfortunately.

Improving the breeze theme to react to the dark theme setting should be doable and would be a massive improvement tho, I just need to find the time to figure out the best solution for that.
Comment 4 Nate Graham 2022-05-21 17:28:30 UTC
Great, I look forward to it!