forked from AuroraMiddleware/gtk
stack: Don't underallocate the last_child
This commit is contained in:
parent
292e0c2663
commit
0d8993fb24
@ -2237,19 +2237,24 @@ gtk_stack_allocate (GtkCssGadget *gadget,
|
|||||||
|
|
||||||
child_allocation.x = 0;
|
child_allocation.x = 0;
|
||||||
child_allocation.y = 0;
|
child_allocation.y = 0;
|
||||||
child_allocation.width = allocation->width;
|
|
||||||
child_allocation.height = allocation->height;
|
|
||||||
|
|
||||||
if (priv->last_visible_child)
|
if (priv->last_visible_child)
|
||||||
{
|
{
|
||||||
int min, nat;
|
int min, nat;
|
||||||
|
gtk_widget_get_preferred_width (priv->last_visible_child->widget, &min, &nat);
|
||||||
|
child_allocation.width = MAX (min, allocation->width);
|
||||||
gtk_widget_get_preferred_height_for_width (priv->last_visible_child->widget,
|
gtk_widget_get_preferred_height_for_width (priv->last_visible_child->widget,
|
||||||
allocation->width,
|
child_allocation.width,
|
||||||
&min, &nat);
|
&min, &nat);
|
||||||
|
child_allocation.height = MAX (min, allocation->height);
|
||||||
|
|
||||||
gtk_widget_size_allocate (priv->last_visible_child->widget, &child_allocation);
|
gtk_widget_size_allocate (priv->last_visible_child->widget, &child_allocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
child_allocation.width = allocation->width;
|
||||||
|
child_allocation.height = allocation->height;
|
||||||
|
|
||||||
if (priv->visible_child)
|
if (priv->visible_child)
|
||||||
{
|
{
|
||||||
int min, nat;
|
int min, nat;
|
||||||
|
Loading…
Reference in New Issue
Block a user