forked from AuroraMiddleware/gtk
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:
parent
646492ceea
commit
28042ef336
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user