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.
This commit is contained in:
2026-02-25 20:23:01 -07:00
parent bbde2e5578
commit 361e35de7f

View File

@@ -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 *