fix(theming): always sync prefer-light/dark with system theme toggle

Issue: #2357
This commit is contained in:
Lysec
2026-04-02 10:53:19 +02:00
parent 25a5eede06
commit ed117eb94c
2 changed files with 5 additions and 8 deletions
+2 -5
View File
@@ -18,15 +18,12 @@ Singleton {
property string colorsJsonFilePath: Settings.configDir + "colors.json"
readonly property string gtkRefreshScript: Quickshell.shellDir + "/Scripts/python/src/theming/gtk-refresh.py"
// GTK template: post_hook runs gtk-refresh after CSS; skip here to avoid a second, early run.
// No GTK template: sync updates org.gnome.desktop.interface when the user enables it.
// prefer-light/prefer-dark only; GTK template post_hook still runs full gtk-refresh.
function pushSystemColorScheme() {
if (!Settings.data.colorSchemes.syncGsettings)
return;
if (TemplateProcessor.isTemplateEnabled("gtk"))
return;
const mode = Settings.data.colorSchemes.darkMode ? "dark" : "light";
Quickshell.execDetached(["python3", gtkRefreshScript, mode]);
Quickshell.execDetached(["python3", gtkRefreshScript, "--appearance-only", mode]);
}
Connections {