mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user