mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
stack: Use gtk_widget_measure
This commit is contained in:
parent
95eed97586
commit
0d88fe65ba
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user