summaryrefslogtreecommitdiff
path: root/gtk/gtkbox.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-02-18 22:55:45 -0500
committerMatthias Clasen <mclasen@redhat.com>2014-02-18 22:55:45 -0500
commite679812be0be787d742c029d24d8c70bf54b88f7 (patch)
treec33970bfc69603ab17bb70f84da6f269c047f09d /gtk/gtkbox.c
parentbb4f8d8ce1961c2d7cb10d198803b4cea6da7b03 (diff)
downloadgtk+-e679812be0be787d742c029d24d8c70bf54b88f7.tar.gz
GtkBox: Fix an off-by-one error with center allocation
This error was causing children to not get allocated when the center widget is the first one in the list of the box's children.
Diffstat (limited to 'gtk/gtkbox.c')
-rw-r--r--gtk/gtkbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index f67770b38c..9fa7f32d40 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -890,11 +890,11 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
{
min_size[child->pack] += req->minimum_size + 2 * child->padding;
nat_size[child->pack] += req->natural_size + 2 * child->padding;
+
+ idx[child->pack] += 1;
}
req->data = child;
-
- idx[child->pack] += 1;
}
/* Determine size of center */