Commit 289fc964 authored by Matthias Clasen's avatar Matthias Clasen

Revert "scrolledwindow: Bug 766569 - Report child natural size unconditionally"

This reverts commit 0943c9f6.

The commit caused unexpected breakage in gtk3-widget-factory,
and also broke the just-added max-content-size properties.
parent 5892bd72
...@@ -1781,18 +1781,17 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget, ...@@ -1781,18 +1781,17 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget,
&min_child_size, &min_child_size,
&nat_child_size); &nat_child_size);
natural_req.width += nat_child_size;
if (priv->hscrollbar_policy == GTK_POLICY_NEVER) if (priv->hscrollbar_policy == GTK_POLICY_NEVER)
{ {
minimum_req.width += min_child_size; minimum_req.width += min_child_size;
natural_req.width += nat_child_size;
} }
else else
{ {
if (priv->min_content_width >= 0) if (priv->min_content_width >= 0)
{ {
minimum_req.width += priv->min_content_width; minimum_req.width += priv->min_content_width;
natural_req.width = MAX (priv->min_content_width, natural_req.width); natural_req.width += priv->min_content_width;
extra_width = -1; extra_width = -1;
} }
...@@ -1823,18 +1822,17 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget, ...@@ -1823,18 +1822,17 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget,
&min_child_size, &min_child_size,
&nat_child_size); &nat_child_size);
natural_req.height += nat_child_size;
if (priv->vscrollbar_policy == GTK_POLICY_NEVER) if (priv->vscrollbar_policy == GTK_POLICY_NEVER)
{ {
minimum_req.height += min_child_size; minimum_req.height += min_child_size;
natural_req.height += nat_child_size;
} }
else else
{ {
if (priv->min_content_height >= 0) if (priv->min_content_height >= 0)
{ {
minimum_req.height += priv->min_content_height; minimum_req.height += priv->min_content_height;
natural_req.height = MAX (priv->min_content_height, natural_req.height); natural_req.height += priv->min_content_height;
extra_height = -1; extra_height = -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment