Updated notify list cell rendering to apply GTK3 RGBA foreground properties and free boxed colors correctly while keeping GTK2 behavior intact.

Switched user list and DCC tree view text columns to select the GTK3 foreground-rgba property (with GTK2 fallbacks) for cell renderer text colors.
Reused RGBA parsing for palette-backed color chooser defaults and clarified palette change tracking comments.
This commit is contained in:
2026-01-22 23:03:50 -07:00
parent 51fd0fca91
commit bc11f40a7a
5 changed files with 32 additions and 10 deletions

View File

@@ -731,12 +731,17 @@ static void
dcc_add_column (GtkWidget *tree, int textcol, int colorcol, char *title, gboolean right_justified)
{
GtkCellRenderer *renderer;
#if GTK_CHECK_VERSION(3,0,0)
const char *foreground_property = "foreground-rgba";
#else
const char *foreground_property = "foreground-gdk";
#endif
renderer = gtk_cell_renderer_text_new ();
if (right_justified)
g_object_set (G_OBJECT (renderer), "xalign", (float) 1.0, NULL);
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree), -1, title, renderer,
"text", textcol, PALETTE_FOREGROUND_PROPERTY, colorcol,
"text", textcol, foreground_property, colorcol,
NULL);
gtk_cell_renderer_text_set_fixed_height_from_font (GTK_CELL_RENDERER_TEXT (renderer), 1);
}