Commit 03742e83 authored by Tristan Van Berkom's avatar Tristan Van Berkom

scrolledwindow: Bug 767238 - Fixing up for max content sizes

Needed to adjust this again after applying commit 4e5ecb70
for bug 742281. Now that we also have max content size properties,
pushed the addition of possible scrollbar sizes to after the
clause which clamps the child request size into min/max content
sizes.
parent 72ea348a
...@@ -1796,12 +1796,6 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget, ...@@ -1796,12 +1796,6 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget,
extra_width = -1; extra_width = -1;
} }
if (policy_may_be_visible (priv->vscrollbar_policy) && !priv->use_indicators)
{
minimum_req.width += vscrollbar_requisition.width;
natural_req.width += vscrollbar_requisition.width;
}
if (priv->max_content_width > -1 && if (priv->max_content_width > -1 &&
priv->max_content_width > natural_req.width && priv->max_content_width > natural_req.width &&
nat_child_size > natural_req.width) nat_child_size > natural_req.width)
...@@ -1815,6 +1809,12 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget, ...@@ -1815,6 +1809,12 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget,
minimum_req.width = MAX (minimum_req.width, width); minimum_req.width = MAX (minimum_req.width, width);
natural_req.width = MAX (natural_req.width, width); natural_req.width = MAX (natural_req.width, width);
} }
if (policy_may_be_visible (priv->vscrollbar_policy) && !priv->use_indicators)
{
minimum_req.width += vscrollbar_requisition.width;
natural_req.width += vscrollbar_requisition.width;
}
} }
} }
else /* GTK_ORIENTATION_VERTICAL */ else /* GTK_ORIENTATION_VERTICAL */
...@@ -1838,12 +1838,6 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget, ...@@ -1838,12 +1838,6 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget,
extra_height = -1; extra_height = -1;
} }
if (policy_may_be_visible (priv->hscrollbar_policy) && !priv->use_indicators)
{
minimum_req.height += hscrollbar_requisition.height;
natural_req.height += hscrollbar_requisition.height;
}
if (priv->max_content_height > -1 && if (priv->max_content_height > -1 &&
priv->max_content_height > natural_req.height && priv->max_content_height > natural_req.height &&
nat_child_size > natural_req.height) nat_child_size > natural_req.height)
...@@ -1857,6 +1851,12 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget, ...@@ -1857,6 +1851,12 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget,
minimum_req.height = MAX (minimum_req.height, height); minimum_req.height = MAX (minimum_req.height, height);
natural_req.height = MAX (natural_req.height, height); natural_req.height = MAX (natural_req.height, height);
} }
if (policy_may_be_visible (priv->hscrollbar_policy) && !priv->use_indicators)
{
minimum_req.height += hscrollbar_requisition.height;
natural_req.height += hscrollbar_requisition.height;
}
} }
} }
} }
......
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