summaryrefslogtreecommitdiff
path: root/gtk/gtkstack.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2016-11-12 18:58:18 +0100
committerTimm Bäder <mail@baedert.org>2016-11-12 20:37:22 +0100
commit0d88fe65bad9058432793281a7d95d61b6d3e898 (patch)
tree48463e5663261fbdeb17b7989b97f19e19a72342 /gtk/gtkstack.c
parent95eed97586a869444e6ccb2225d0b51c823ba71a (diff)
downloadgtk+-0d88fe65bad9058432793281a7d95d61b6d3e898.tar.gz
stack: Use gtk_widget_measure
Diffstat (limited to 'gtk/gtkstack.c')
-rw-r--r--gtk/gtkstack.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index b865104eef..7416718184 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -2230,11 +2230,14 @@ gtk_stack_allocate (GtkCssGadget *gadget,
if (priv->last_visible_child)
{
int min, nat;
- gtk_widget_get_preferred_width (priv->last_visible_child->widget, &min, &nat);
+
+ gtk_widget_measure (priv->last_visible_child->widget, GTK_ORIENTATION_HORIZONTAL,
+ -1,
+ &min, &nat, NULL, NULL);
child_allocation.width = MAX (min, allocation->width);
- gtk_widget_get_preferred_height_for_width (priv->last_visible_child->widget,
- child_allocation.width,
- &min, &nat);
+ gtk_widget_measure (priv->last_visible_child->widget, GTK_ORIENTATION_VERTICAL,
+ child_allocation.width,
+ &min, &nat, NULL, NULL);
child_allocation.height = MAX (min, allocation->height);
gtk_widget_size_allocate (priv->last_visible_child->widget, &child_allocation);