summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2016-05-16 21:13:14 +0200
committerMatthias Clasen <mclasen@redhat.com>2016-05-19 12:10:07 -0400
commit1e2bde6971d68cf7a8eec972dbde85d3492e4086 (patch)
tree2f302c23adc96a1b75057f4aa1229ce6ade627ae
parent7d2f54f0f3a3d06be919a75bb6f7f03a929555a7 (diff)
downloadgtk+-1e2bde6971d68cf7a8eec972dbde85d3492e4086.tar.gz
scrolledwindow: Fix typo in get_preferred_height calculation
When we are beginning to calculate the height, if the vscrollbar_policy is not GTK_POLICY_NEVER, and there is no min-content-height, then we need some small non-zero value to get started. The idea is to always ask for at least enough to fit the horizontal scrollbar. Simply put, this should be the mirror image of the corresponding width calculation code. Those who got used to the buggy behaviour might notice that their GtkScrolledWindows are not as tall as they used to be. Fall out from 55196a705f00564a44647bfc97981db0a783369a https://bugzilla.gnome.org/show_bug.cgi?id=766530
-rw-r--r--gtk/gtkscrolledwindow.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index bba19ed8e0..0918d72315 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1786,10 +1786,10 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget,
natural_req.height = MAX (natural_req.height, priv->min_content_height);
extra_height = -1;
}
- else if (policy_may_be_visible (priv->vscrollbar_policy) && !priv->use_indicators)
+ else if (policy_may_be_visible (priv->hscrollbar_policy) && !priv->use_indicators)
{
- minimum_req.height += vscrollbar_requisition.height;
- natural_req.height += vscrollbar_requisition.height;
+ minimum_req.height += hscrollbar_requisition.height;
+ natural_req.height += hscrollbar_requisition.height;
}
}
}