I fixed a Windows theming regression path in fe_apply_windows_theme() by changing the fallback-disable condition from “a GTK3 theme name is configured” to “a GTK3 theme provider is actually active.” This ensures fallback dark/light palette CSS is still applied when a configured imported GTK3 theme fails to load, preserving Windows release theming behavior instead of leaving mismatched visuals.

I added an in-code explanation documenting this Windows-release safety behavior so the intent is explicit for future maintenance.
This commit is contained in:
2026-02-26 12:10:59 -07:00
parent 2ece544792
commit 5763653672

View File

@@ -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)
{