stack: Store actual widget size, not preferred size
This is just a cleanup commit, no actual bug.
This commit is contained in:
@ -1093,14 +1093,12 @@ set_visible_child (GtkStack *stack,
|
|||||||
{
|
{
|
||||||
if (gtk_widget_is_visible (widget))
|
if (gtk_widget_is_visible (widget))
|
||||||
{
|
{
|
||||||
int fake;
|
GtkAllocation allocation;
|
||||||
|
|
||||||
priv->last_visible_child = priv->visible_child;
|
priv->last_visible_child = priv->visible_child;
|
||||||
gtk_widget_get_preferred_width (priv->last_visible_child->widget,
|
gtk_widget_get_allocated_size (priv->last_visible_child->widget, &allocation, NULL);
|
||||||
&fake,
|
priv->last_visible_widget_width = allocation.width;
|
||||||
&priv->last_visible_widget_width);
|
priv->last_visible_widget_height = allocation.height;
|
||||||
gtk_widget_get_preferred_height (priv->last_visible_child->widget,
|
|
||||||
&fake,
|
|
||||||
&priv->last_visible_widget_height);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user