scrolledwindow: Bug 766569 - Report child natural size unconditionally
This patch causes the scrolled window default behavior to change in such a way that the natural size request of the child is unconditionally reported, which probably should have been the case since day 1. This should not cause significant fallout since a scrolled window is normally used to expand/fill, eating up remaining space for scrollable content - it will however cause the scrolled window to compete for additional space with siblings, proportionally to the size of the scrolled window's content.
This commit is contained in:
parent
c4224bf9d0
commit
0943c9f6b2
@ -1781,17 +1781,18 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget,
|
||||
&min_child_size,
|
||||
&nat_child_size);
|
||||
|
||||
natural_req.width += nat_child_size;
|
||||
|
||||
if (priv->hscrollbar_policy == GTK_POLICY_NEVER)
|
||||
{
|
||||
minimum_req.width += min_child_size;
|
||||
natural_req.width += nat_child_size;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (priv->min_content_width >= 0)
|
||||
{
|
||||
minimum_req.width += priv->min_content_width;
|
||||
natural_req.width += priv->min_content_width;
|
||||
natural_req.width = MAX (priv->min_content_width, natural_req.width);
|
||||
extra_width = -1;
|
||||
}
|
||||
|
||||
@ -1822,17 +1823,18 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget,
|
||||
&min_child_size,
|
||||
&nat_child_size);
|
||||
|
||||
natural_req.height += nat_child_size;
|
||||
|
||||
if (priv->vscrollbar_policy == GTK_POLICY_NEVER)
|
||||
{
|
||||
minimum_req.height += min_child_size;
|
||||
natural_req.height += nat_child_size;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (priv->min_content_height >= 0)
|
||||
{
|
||||
minimum_req.height += priv->min_content_height;
|
||||
natural_req.height += priv->min_content_height;
|
||||
natural_req.height = MAX (priv->min_content_height, natural_req.height);
|
||||
extra_height = -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user