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 0d9ebb501d

https://bugzilla.gnome.org/show_bug.cgi?id=766569
This commit is contained in:
Debarshi Ray 2016-05-16 21:50:05 +02:00
parent 2b628e9e38
commit c81cd94b8f

View File

@ -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)