Commit c81cd94b authored by Debarshi Ray's avatar Debarshi Ray

scrolledwindow: Remove redundant use of MAX

This code tries to add the minimum content size, if one is set, to the
GtkScrolledWindow's size requisition. This is obvious from the check
for non-negative values of min-content-height and min-content-width.
Using MAX needlessly makes the code harder to read by implying that
there is more to it when there actually isn't.

Fall out from 0d9ebb50

https://bugzilla.gnome.org/show_bug.cgi?id=766569
parent 2b628e9e
......@@ -1757,8 +1757,8 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget,
{
if (priv->min_content_width >= 0)
{
minimum_req.width = MAX (minimum_req.width, priv->min_content_width);
natural_req.width = MAX (natural_req.width, priv->min_content_width);
minimum_req.width += priv->min_content_width;
natural_req.width += priv->min_content_width;
extra_width = -1;
}
else if (policy_may_be_visible (priv->vscrollbar_policy) && !priv->use_indicators)
......@@ -1783,8 +1783,8 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget,
{
if (priv->min_content_height >= 0)
{
minimum_req.height = MAX (minimum_req.height, priv->min_content_height);
natural_req.height = MAX (natural_req.height, priv->min_content_height);
minimum_req.height += priv->min_content_height;
natural_req.height += priv->min_content_height;
extra_height = -1;
}
else if (policy_may_be_visible (priv->hscrollbar_policy) && !priv->use_indicators)
......
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