From 7143aec20da2f12c5d9b7f932a8cc2b912be403d Mon Sep 17 00:00:00 2001 From: deepend Date: Mon, 16 Feb 2026 13:58:10 -0700 Subject: [PATCH] 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. --- src/fe-gtk/chanview.c | 10 +++++++--- src/fe-gtk/maingui.c | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/fe-gtk/chanview.c b/src/fe-gtk/chanview.c index b4ded326..f4055d54 100644 --- a/src/fe-gtk/chanview.c +++ b/src/fe-gtk/chanview.c @@ -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); } } diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index b9d1950d..5a59b876 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -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