Updated channel tree theming to always apply the current input font (input_style->font_desc) when re-theming, so channel list font type/size stays in sync with font preference changes.

Updated user list creation to apply the current input font in GTK3 when palette styling is applied, so the user list reflects font changes consistently.
Updated channel view creation in GTK3 to always pass the current input font to chanview_new, ensuring channel list typography starts with the configured font.
Updated settings re-apply logic to always include the current input font for the user list in GTK3, so runtime font updates take effect there as well.
This commit is contained in:
2026-02-16 13:58:10 -07:00
parent 65d399fa5b
commit 7143aec20d
2 changed files with 9 additions and 5 deletions

View File

@@ -113,6 +113,7 @@ chanview_apply_theme (chanview *cv)
{
GtkWidget *w;
treeview *tv;
const PangoFontDescription *font = NULL;
if (cv == NULL)
return;
@@ -126,14 +127,17 @@ chanview_apply_theme (chanview *cv)
return;
w = GTK_WIDGET (tv->tree);
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], NULL);
gtkutil_apply_palette (w, &colors[COL_BG], &colors[COL_FG], font);
}
else
{
/* Revert back to theme defaults. */
gtkutil_apply_palette (w, NULL, NULL, NULL);
/* Keep list font in sync while reverting colors to theme defaults. */
gtkutil_apply_palette (w, NULL, NULL, font);
}
}

View File

@@ -2825,7 +2825,7 @@ mg_create_userlist (session_gui *gui, GtkWidget *box)
if (prefs.hex_gui_ulist_style || fe_dark_mode_is_enabled ())
{
gtkutil_apply_palette (ulist, &colors[COL_BG], &colors[COL_FG],
prefs.hex_gui_ulist_style ? input_style->font_desc : NULL);
input_style ? input_style->font_desc : NULL);
}
mg_create_meters (gui, vbox);
@@ -3774,7 +3774,7 @@ mg_create_tabs (session_gui *gui)
gui->chanview = chanview_new (prefs.hex_gui_tab_layout, prefs.hex_gui_tab_trunc,
prefs.hex_gui_tab_sort, use_icons,
#if HAVE_GTK3
prefs.hex_gui_ulist_style && input_style ? input_style->font_desc : NULL
input_style ? input_style->font_desc : NULL
#else
prefs.hex_gui_ulist_style ? input_style : NULL
#endif