Routed GTK cell renderer foreground bindings through PALETTE_FOREGROUND_PROPERTY for user list, notify, and DCC views to ensure GTK3 uses RGBA while preserving GTK2 behavior.

Tightened GTK3 RGBA parsing by using stack buffers in palette color conversion and guarded parsing in the setup color chooser dialog.
This commit is contained in:
2026-01-22 22:47:11 -07:00
parent 3c0a4e4995
commit 51fd0fca91
5 changed files with 7 additions and 25 deletions

View File

@@ -735,15 +735,9 @@ dcc_add_column (GtkWidget *tree, int textcol, int colorcol, char *title, gboolea
renderer = gtk_cell_renderer_text_new ();
if (right_justified)
g_object_set (G_OBJECT (renderer), "xalign", (float) 1.0, NULL);
#if GTK_CHECK_VERSION(3,0,0)
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree), -1, title, renderer,
"text", textcol, "foreground-rgba", colorcol,
"text", textcol, PALETTE_FOREGROUND_PROPERTY, colorcol,
NULL);
#else
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree), -1, title, renderer,
"text", textcol, "foreground-gdk", colorcol,
NULL);
#endif
gtk_cell_renderer_text_set_fixed_height_from_font (GTK_CELL_RENDERER_TEXT (renderer), 1);
}