mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-13 17:20:21 +00:00
Updated the chanview API to use GTK3-safe font descriptions while keeping GTK2 style handling conditional in the header and implementation.
Guarded tree view palette application to use GTK3 font descriptions or GTK2 styles appropriately. Adjusted the chanview creation call site to pass GTK3 font descriptions or GTK2 styles based on the build.
This commit is contained in:
@@ -116,11 +116,17 @@ cv_tree_init (chanview *cv)
|
||||
|
||||
view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (cv->store));
|
||||
gtk_widget_set_name (view, "zoitechat-tree");
|
||||
if (cv->style)
|
||||
if (
|
||||
#if HAVE_GTK3
|
||||
cv->font_desc
|
||||
#else
|
||||
cv->style
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#if HAVE_GTK3
|
||||
gtkutil_apply_palette (view, &colors[COL_BG], &colors[COL_FG],
|
||||
cv->style->font_desc);
|
||||
cv->font_desc);
|
||||
#else
|
||||
gtkutil_apply_palette (view, &cv->style->base[GTK_STATE_NORMAL],
|
||||
&cv->style->text[GTK_STATE_NORMAL],
|
||||
|
||||
Reference in New Issue
Block a user