summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-04-05 11:30:41 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-04-05 11:30:41 +0200
commit12d6b0fe6251e77dbda8c3daeefacb028a267750 (patch)
tree736117a0046f9bdfb90090b6d018bbb684f6472c
parent7b0fd635fa39a27693655171a4cdc0150ae476ed (diff)
downloadgtk+-12d6b0fe6251e77dbda8c3daeefacb028a267750.tar.gz
paned: Shrinkable widgets don't require a size
This could otherwise lead to very funny size request behaviors, in particular in empathy. https://bugzilla.gnome.org/show_bug.cgi?id=587441
-rw-r--r--gtk/gtkpaned.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index f2fbe13dad..5b374b2dfd 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -904,7 +904,10 @@ gtk_paned_get_preferred_size (GtkWidget *widget,
if (priv->child1 && gtk_widget_get_visible (priv->child1))
{
get_preferred_size_for_size (priv->child1, orientation, size, &child_min, &child_nat);
- *minimum = child_min;
+ if (priv->child1_shrink && priv->orientation == orientation)
+ *minimum = 0;
+ else
+ *minimum = child_min;
*natural = child_nat;
}
@@ -914,7 +917,8 @@ gtk_paned_get_preferred_size (GtkWidget *widget,
if (priv->orientation == orientation)
{
- *minimum += child_min;
+ if (!priv->child2_shrink)
+ *minimum += child_min;
*natural += child_nat;
}
else