diff options
author | Axel Spoerl <axel.spoerl@qt.io> | 2023-05-13 11:37:52 +0200 |
---|---|---|
committer | Axel Spoerl <axel.spoerl@qt.io> | 2023-05-22 16:43:02 +0200 |
commit | 227b639499d7e9ebabd6e07e80f2c5c63a6a2154 (patch) | |
tree | fe9a0f67472f1800c4c234e3a30d87bfc819f33a /src/gui/platform | |
parent | 486a89f7bb7007bf045195193999070c54e3dc0d (diff) |
Make Gnome theme react to color theme changes without GTK
Qt doesn't react to color theme changes on systems running Gnome
without GTK.
This patch adds support for such in QGnomeTheme, following
https://blogs.gnome.org/alexm/2021/10/04/dark-style-preference/
Pick-to: 6.5
Change-Id: I1f6252d4f394b810b9e4aebe00f2715c8fec3b56
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/gui/platform')
-rw-r--r-- | src/gui/platform/unix/qgenericunixthemes.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/platform/unix/qgenericunixthemes.cpp b/src/gui/platform/unix/qgenericunixthemes.cpp index c96307d22b..af2307fd09 100644 --- a/src/gui/platform/unix/qgenericunixthemes.cpp +++ b/src/gui/platform/unix/qgenericunixthemes.cpp @@ -375,6 +375,9 @@ void QGenericUnixThemeDBusListener::populateSignalMap() m_signalMap.insert(DBusKey("org.gnome.desktop.interface"_L1, "gtk-theme"_L1), ChangeSignal(Provider::Gtk, Setting::Theme)); + m_signalMap.insert(DBusKey("org.freedesktop.appearance"_L1, "color-scheme"_L1), + ChangeSignal(Provider::Gnome, Setting::ColorTheme)); + const QString &saveJsonFile = qEnvironmentVariable("QT_QPA_DBUS_SIGNALS_SAVE"); if (!saveJsonFile.isEmpty()) saveJson(saveJsonFile); |