listbox: Fix css node ordering

When inserting a child at the top, we were not inserting its
css node properly.

https://bugzilla.gnome.org/show_bug.cgi?id=764710
This commit is contained in:
Matthias Clasen 2016-04-11 07:52:39 -04:00
parent 646492ceea
commit 28042ef336

View File

@ -2814,17 +2814,18 @@ gtk_list_box_insert_css_node (GtkListBox *box,
GSequenceIter *iter)
{
GSequenceIter *prev_iter;
GtkWidget *sibling;
GtkCssNode *sibling;
prev_iter = g_sequence_iter_prev (iter);
if (prev_iter != iter)
{
sibling = g_sequence_get (prev_iter);
gtk_css_node_insert_after (gtk_widget_get_css_node (GTK_WIDGET (box)),
gtk_widget_get_css_node (child),
gtk_widget_get_css_node (sibling));
}
sibling = gtk_widget_get_css_node (g_sequence_get (prev_iter));
else
sibling = NULL;
gtk_css_node_insert_after (gtk_widget_get_css_node (GTK_WIDGET (box)),
gtk_widget_get_css_node (child),
sibling);
}
/**