[gtk+/gtk-3-6] sizegroup: Always at least use widget's size
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-6] sizegroup: Always at least use widget's size
- Date: Thu, 1 Nov 2012 19:54:14 +0000 (UTC)
commit 73c64b4b67c526977831fbf748f5f284cbc894cb
Author: Benjamin Otte <otte redhat com>
Date: Thu Nov 1 20:22:35 2012 +0100
sizegroup: Always at least use widget's size
When widgets were hidden, they were otherwise assigned a 0 size.
https://bugzilla.gnome.org/show_bug.cgi?id=677609
gtk/gtksizegroup.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtksizegroup.c b/gtk/gtksizegroup.c
index b5b043d..091505a 100644
--- a/gtk/gtksizegroup.c
+++ b/gtk/gtksizegroup.c
@@ -746,6 +746,11 @@ compute_dimension (GtkWidget *widget,
min_dimension = *minimum;
nat_dimension = *natural;
}
+ else if (!gtk_widget_get_mapped (tmp_widget) && priv->ignore_hidden)
+ {
+ min_dimension = 0;
+ nat_dimension = 0;
+ }
else
{
if (mode == GTK_SIZE_GROUP_HORIZONTAL)
@@ -754,11 +759,8 @@ compute_dimension (GtkWidget *widget,
gtk_widget_get_preferred_height (tmp_widget, &min_dimension, &nat_dimension);
}
- if (gtk_widget_get_mapped (tmp_widget) || !priv->ignore_hidden)
- {
- min_result = MAX (min_result, min_dimension);
- nat_result = MAX (nat_result, nat_dimension);
- }
+ min_result = MAX (min_result, min_dimension);
+ nat_result = MAX (nat_result, nat_dimension);
tmp_list = tmp_list->next;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]