[gtk+] Revert "scrolledwindow: Bug 766569 - Report child natural size unconditionally"
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Revert "scrolledwindow: Bug 766569 - Report child natural size unconditionally"
- Date: Mon, 6 Jun 2016 18:36:00 +0000 (UTC)
commit 289fc9640bbeba1096f15bb0b735d0361cf4c9dc
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 6 14:29:27 2016 -0400
Revert "scrolledwindow: Bug 766569 - Report child natural size unconditionally"
This reverts commit 0943c9f6b2c3ad5827ae5d8f3742f75e72782e41.
The commit caused unexpected breakage in gtk3-widget-factory,
and also broke the just-added max-content-size properties.
gtk/gtkscrolledwindow.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 1a5014d..1fbf189 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1781,18 +1781,17 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget,
&min_child_size,
&nat_child_size);
- natural_req.width += nat_child_size;
-
if (priv->hscrollbar_policy == GTK_POLICY_NEVER)
{
minimum_req.width += min_child_size;
+ natural_req.width += nat_child_size;
}
else
{
if (priv->min_content_width >= 0)
{
minimum_req.width += priv->min_content_width;
- natural_req.width = MAX (priv->min_content_width, natural_req.width);
+ natural_req.width += priv->min_content_width;
extra_width = -1;
}
@@ -1823,18 +1822,17 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget,
&min_child_size,
&nat_child_size);
- natural_req.height += nat_child_size;
-
if (priv->vscrollbar_policy == GTK_POLICY_NEVER)
{
minimum_req.height += min_child_size;
+ natural_req.height += nat_child_size;
}
else
{
if (priv->min_content_height >= 0)
{
minimum_req.height += priv->min_content_height;
- natural_req.height = MAX (priv->min_content_height, natural_req.height);
+ natural_req.height += priv->min_content_height;
extra_height = -1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]