[gtk+] listbox: Fix css node ordering
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] listbox: Fix css node ordering
- Date: Mon, 11 Apr 2016 11:53:16 +0000 (UTC)
commit 28042ef3363f8ad069190c355503801b20742217
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 11 07:52:39 2016 -0400
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
gtk/gtklistbox.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index c3aa6a9..2ffa768 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -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);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]