From 57636536726493d184a44c9bd4d91e1e944749ce Mon Sep 17 00:00:00 2001 From: deepend Date: Thu, 26 Feb 2026 12:10:59 -0700 Subject: [PATCH] =?UTF-8?q?I=20fixed=20a=20Windows=20theming=20regression?= =?UTF-8?q?=20path=20in=20fe=5Fapply=5Fwindows=5Ftheme()=20by=20changing?= =?UTF-8?q?=20the=20fallback-disable=20condition=20from=20=E2=80=9Ca=20GTK?= =?UTF-8?q?3=20theme=20name=20is=20configured=E2=80=9D=20to=20=E2=80=9Ca?= =?UTF-8?q?=20GTK3=20theme=20provider=20is=20actually=20active.=E2=80=9D?= =?UTF-8?q?=20This=20ensures=20fallback=20dark/light=20palette=20CSS=20is?= =?UTF-8?q?=20still=20applied=20when=20a=20configured=20imported=20GTK3=20?= =?UTF-8?q?theme=20fails=20to=20load,=20preserving=20Windows=20release=20t?= =?UTF-8?q?heming=20behavior=20instead=20of=20leaving=20mismatched=20visua?= =?UTF-8?q?ls.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I added an in-code explanation documenting this Windows-release safety behavior so the intent is explicit for future maintenance. --- src/fe-gtk/fe-gtk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index f86a903a..40e9f2f0 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -954,8 +954,12 @@ fe_apply_windows_theme (gboolean dark) * Otherwise ZoiteChat's fallback dark/light window background CSS can * clash with theme widget colors (for example white buttons on a dark * window background). + * + * Use the active provider state (not only the configured preference): if + * a configured theme fails to load we still want fallback palette CSS so + * the app keeps a coherent dark/light appearance on Windows releases. */ - if (prefs.hex_gui_gtk3_theme_name[0] != '\0') + if (gtk3_theme_provider != NULL) { if (win_theme_provider && screen) {