[gtk+] Only count visible children during size request
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Only count visible children during size request
- Date: Sun, 6 Mar 2011 04:27:38 +0000 (UTC)
commit e2ba86289f7524a174a8e5e27801585cacb0169a
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Mar 5 23:25:35 2011 -0500
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.
gtk/gtkbox.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index 1ff75eb..f508173 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;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]