diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-03-05 23:25:35 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-03-05 23:27:26 -0500 |
commit | e2ba86289f7524a174a8e5e27801585cacb0169a (patch) | |
tree | 706418effcc8520d7769e1e597a6e04086aa78af /gtk/gtkbox.c | |
parent | 8b17b16d63bebbf85fa211b192e0cdc669120ba2 (diff) | |
download | gtk+-e2ba86289f7524a174a8e5e27801585cacb0169a.tar.gz |
Only count visible children during size request
This was causing spacing between image and label to be requested
in buttons, even though the image is invisible.
Diffstat (limited to 'gtk/gtkbox.c')
-rw-r--r-- | gtk/gtkbox.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c index 1ff75ebb33..f508173430 100644 --- a/gtk/gtkbox.c +++ b/gtk/gtkbox.c @@ -1164,7 +1164,7 @@ gtk_box_compute_size_for_orientation (GtkBox *box, gint largest_child = 0, largest_natural = 0; for (children = private->children; children != NULL; - children = children->next, nvis_children++) + children = children->next) { GtkBoxChild *child = children->data; @@ -1190,6 +1190,8 @@ gtk_box_compute_size_for_orientation (GtkBox *box, required_size += child_size; required_natural += child_natural; + + nvis_children += 1; } } |