1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-01 19:18:28 -04:00

matugen: make GTK4 live-refresh opt-in, off by default. Bump the settle

timeout
fixes #2552
This commit is contained in:
bbedward
2026-07-04 22:38:20 -04:00
parent 33384e4d5d
commit a3fba8fcb6
3 changed files with 20 additions and 3 deletions
+8 -1
View File
@@ -928,7 +928,14 @@ func expectColorSchemeEcho(scheme string) {
}
}
// The color-scheme round trip is the only mechanism that makes running GTK4
// apps reload ~/.config/gtk-4.0 CSS (a gtk-theme flip does not). But apps
// following the portal color-scheme (Chromium) can drop the restore signal
// mid-repaint and latch the wrong mode, so this is opt-in.
func refreshGTK4() {
if os.Getenv("DMS_ENABLE_GTK4_REFRESH") != "1" {
return
}
output, err := utils.GsettingsGet("org.gnome.desktop.interface", "color-scheme")
if err != nil {
return
@@ -947,7 +954,7 @@ func refreshGTK4() {
log.Warnf("Failed to toggle color-scheme for GTK4 refresh: %v", err)
return
}
time.Sleep(50 * time.Millisecond)
time.Sleep(400 * time.Millisecond)
expectColorSchemeEcho(current)
if err := utils.GsettingsSet("org.gnome.desktop.interface", "color-scheme", current); err != nil {
log.Warnf("Failed to restore color-scheme for GTK4 refresh: %v", err)
+2 -2
View File
@@ -97,7 +97,7 @@ Singleton {
return typeof Theme !== "undefined";
}
// Only follow values stable for the settle window — the GTK4-refresh toggle reverts within ~50ms and following it would loop.
// Only follow values stable for the settle window — the opt-in GTK4-refresh toggle reverts within ~400ms and following it would loop.
function evaluateColorScheme() {
if (!canSyncColorScheme())
return;
@@ -111,7 +111,7 @@ Singleton {
Timer {
id: colorSchemeSettleTimer
interval: 750
interval: 1000
onTriggered: {
if (!root.canSyncColorScheme())
return;
+10
View File
@@ -0,0 +1,10 @@
# adw-gtk3 assets
Image assets vendored from [adw-gtk3](https://github.com/lassekongo83/adw-gtk3)
(`src/assets/`), used by the generated GTK3 light theme
(`quickshell/matugen/templates/gtk-light-colors.css`, itself derived from
adw-gtk3's `gtk.css`).
adw-gtk3 is licensed under the GNU Lesser General Public License v2.1 — see
`LICENSE.adw-gtk3`. These files are covered by that license; the rest of this
repository remains under its own license.