Standardized GtkCellRendererText foreground bindings to use the palette foreground property macro across user list, notify list, and DCC views (GTK2/GTK3 aware).

Generated GTK3 caret-color CSS using GdkRGBA string conversion instead of manual RGB math for input styling.
Simplified palette RGB16 parsing by building a GdkRGBA-compatible color string before parsing.
This commit is contained in:
2026-01-22 22:25:26 -07:00
parent 61669f6b98
commit 9959cf1f24
5 changed files with 11 additions and 27 deletions

View File

@@ -547,15 +547,9 @@ userlist_add_columns (GtkTreeView * treeview)
if (prefs.hex_gui_compact)
g_object_set (G_OBJECT (renderer), "ypad", 0, NULL);
gtk_cell_renderer_text_set_fixed_height_from_font (GTK_CELL_RENDERER_TEXT (renderer), 1);
#if GTK_CHECK_VERSION(3,0,0)
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
-1, NULL, renderer,
"text", 1, "foreground-rgba", 4, NULL);
#else
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
-1, NULL, renderer,
"text", 1, "foreground-gdk", 4, NULL);
#endif
"text", 1, PALETTE_FOREGROUND_PROPERTY, 4, NULL);
if (prefs.hex_gui_ulist_show_hosts)
{