GNOME Bugzilla – Bug 731911
Add GtkListBox header code helper
Last modified: 2015-06-21 01:36:02 UTC
This piece of code is copied 19 times in gnome-control-center: static void cc_color_panel_header_func (GtkListBoxRow *row, GtkListBoxRow *before, gpointer user_data) { GtkWidget *current; if (before == NULL) return; current = gtk_list_box_row_get_header (row); if (current == NULL) { current = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL); gtk_widget_show (current); gtk_list_box_row_set_header (row, current); } } We should have this piece of code in GTK+ instead.
The inofficial plan for separators in listboxes is to use css. It almost works now, with something like .list-row { border-width: 1px; border-color: red; border-style: solid; } The missing piece is :first-child/:last-child support so we can avoid extraneous or missing separators at the top/bottom.
first-/last-child support is in place now.