From 361e35de7fabf2e986945b3017010a2469f577d4 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 20:23:01 -0700 Subject: [PATCH] Updated chanview_apply_theme() in src/fe-gtk/chanview.c to apply the palette colors unconditionally (for tree view chanview), instead of branching on raw dark-mode enum checks. This keys behavior off the already-resolved palette output, which matches how setup_apply_to_sess() / palette_apply_dark_mode() flows are intended to work. Preserved font handling exactly as before (input_style->font_desc when available). Added inline rationale comment clarifying that AUTO/light should continue using palette-managed colors and should not revert to GTK theme defaults in a way that clears custom colors. --- src/fe-gtk/chanview.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/fe-gtk/chanview.c b/src/fe-gtk/chanview.c index 3edb3ebe..1d7e6274 100644 --- a/src/fe-gtk/chanview.c +++ b/src/fe-gtk/chanview.c @@ -127,15 +127,15 @@ chanview_apply_theme (chanview *cv) if (input_style) font = input_style->font_desc; - if (fe_dark_mode_is_enabled () || prefs.hex_gui_dark_mode == ZOITECHAT_DARK_MODE_LIGHT) - { - gtkutil_apply_palette (w, &colors[COL_BG], &colors[COL_FG], font); - } - else - { - /* Keep list font in sync while reverting colors to theme defaults. */ - gtkutil_apply_palette (w, NULL, NULL, font); - } + /* + * setup_apply_to_sess() and palette_apply_dark_mode() treat all dark-mode + * preference modes as palette-driven: dark uses curated dark colors, while + * light/auto-light use the user's saved palette. + * + * Keep chanview aligned with that resolved behavior so AUTO doesn't + * accidentally revert to theme defaults and clear custom colors. + */ + gtkutil_apply_palette (w, &colors[COL_BG], &colors[COL_FG], font); } static char *