Added gtkutil_apply_palette declaration and implementation to apply palette colors/fonts via GTK3 CSS providers with GTK2 fallbacks preserved.

Switched channel tree and theme application logic to use the new palette helper.
Updated entry and user list styling to route palette/font application through the helper.
This commit is contained in:
2026-01-25 11:30:21 -07:00
parent 08d357dc98
commit 94789a9100
5 changed files with 85 additions and 17 deletions

View File

@@ -124,14 +124,12 @@ chanview_apply_theme (chanview *cv)
w = GTK_WIDGET (tv->tree);
if (fe_dark_mode_is_enabled () || prefs.hex_gui_dark_mode == ZOITECHAT_DARK_MODE_LIGHT)
{
gtk_widget_modify_base (w, GTK_STATE_NORMAL, &colors[COL_BG]);
gtk_widget_modify_text (w, GTK_STATE_NORMAL, &colors[COL_FG]);
gtkutil_apply_palette (w, &colors[COL_BG], &colors[COL_FG], NULL);
}
else
{
/* Revert back to theme defaults. */
gtk_widget_modify_base (w, GTK_STATE_NORMAL, NULL);
gtk_widget_modify_text (w, GTK_STATE_NORMAL, NULL);
gtkutil_apply_palette (w, NULL, NULL, NULL);
}
}