mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-11-10 01:15:41 +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:
1 parent
6c17f4bc16
commit
9bdbeffeb0
4 files changed
+35
-5
No files matched your search
@@ -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