forked from AuroraMiddleware/gtk
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:
parent
2b628e9e38
commit
c81cd94b8f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user