summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2014-02-19 21:15:25 +0100
committerBenjamin Otte <otte@redhat.com>2014-02-20 02:10:07 +0100
commitb9e37f8d2d4d14d3cb23f56a795fcdd2e6128e88 (patch)
treee81aeb75e81f042300f966c88883c09bd4a77bb0
parent1d422deb0f12aadb01b91d2b55a317c9e265dde6 (diff)
downloadgtk+-b9e37f8d2d4d14d3cb23f56a795fcdd2e6128e88.tar.gz
revealer: Allocate extra size to child
Do not constrain the child widget to its preferred size when the revealer is larger. https://bugzilla.gnome.org/show_bug.cgi?id=724742
-rw-r--r--gtk/gtkrevealer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkrevealer.c b/gtk/gtkrevealer.c
index 32b6668c46..511caa8966 100644
--- a/gtk/gtkrevealer.c
+++ b/gtk/gtkrevealer.c
@@ -303,8 +303,8 @@ gtk_revealer_get_child_allocation (GtkRevealer *revealer,
child_allocation->x = 0;
child_allocation->y = 0;
- child_allocation->width = allocation->width;
- child_allocation->height = allocation->height;
+ child_allocation->width = 0;
+ child_allocation->height = 0;
child = gtk_bin_get_child (GTK_BIN (revealer));
if (child != NULL && gtk_widget_get_visible (child))
@@ -318,6 +318,9 @@ gtk_revealer_get_child_allocation (GtkRevealer *revealer,
gtk_widget_get_preferred_height_for_width (child, child_allocation->width, NULL,
&child_allocation->height);
}
+
+ child_allocation->width = MAX (child_allocation->width, allocation->width);
+ child_allocation->height = MAX (child_allocation->height, allocation->height);
}
static void