mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 14:30:15 +00:00
stack: Queue a resize/allocate when switching children
We only allocate a size to the currently visible child, so we obviously need to rerun allocation when the visible child changes. In the case where the stack is not homogenous, we also need to queue a resize because our size request just changed.
This commit is contained in:
parent
c580a9d01f
commit
b6b00c31d7
@ -1145,6 +1145,11 @@ set_visible_child (GtkStack *stack,
|
||||
transition_type = get_simple_transition_type (i_first, transition_type);
|
||||
}
|
||||
|
||||
if (priv->hhomogeneous && priv->vhomogeneous)
|
||||
gtk_widget_queue_allocate (widget);
|
||||
else
|
||||
gtk_widget_queue_resize (widget);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (stack), stack_props[PROP_VISIBLE_CHILD]);
|
||||
g_object_notify_by_pspec (G_OBJECT (stack),
|
||||
stack_props[PROP_VISIBLE_CHILD_NAME]);
|
||||
|
Loading…
Reference in New Issue
Block a user