diff options
author | Benjamin Otte <otte@redhat.com> | 2012-11-11 19:30:11 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-11-11 20:26:27 +0100 |
commit | b0f3aa82b7759bb9a84d8f354846b8020ed0f989 (patch) | |
tree | f0033436d5a10df504130cbb634e0bb27bb5c9d9 /gtk/gtkbin.c | |
parent | 4950f68a87795b2d23670f7afe9b4652296aed58 (diff) | |
download | gtk+-b0f3aa82b7759bb9a84d8f354846b8020ed0f989.tar.gz |
bin: Only handle size for the child if it is visible
Diffstat (limited to 'gtk/gtkbin.c')
-rw-r--r-- | gtk/gtkbin.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c index e17d2be794..11b46f4678 100644 --- a/gtk/gtkbin.c +++ b/gtk/gtkbin.c @@ -189,7 +189,7 @@ gtk_bin_get_preferred_width (GtkWidget *widget, GtkBin *bin = GTK_BIN (widget); GtkBinPrivate *priv = bin->priv; - if (priv->child) + if (priv->child && gtk_widget_get_visible (priv->child)) { gint child_min, child_nat; gtk_widget_get_preferred_width (priv->child, @@ -207,7 +207,7 @@ gtk_bin_get_preferred_height (GtkWidget *widget, GtkBin *bin = GTK_BIN (widget); GtkBinPrivate *priv = bin->priv; - if (priv->child) + if (priv->child && gtk_widget_get_visible (priv->child)) { gint child_min, child_nat; gtk_widget_get_preferred_height (priv->child, @@ -226,7 +226,7 @@ gtk_bin_get_preferred_width_for_height (GtkWidget *widget, GtkBin *bin = GTK_BIN (widget); GtkBinPrivate *priv = bin->priv; - if (priv->child) + if (priv->child && gtk_widget_get_visible (priv->child)) { gint child_min, child_nat; gtk_widget_get_preferred_width_for_height (priv->child, height, @@ -248,7 +248,7 @@ gtk_bin_get_preferred_height_for_width (GtkWidget *widget, GtkBin *bin = GTK_BIN (widget); GtkBinPrivate *priv = bin->priv; - if (priv->child) + if (priv->child && gtk_widget_get_visible (priv->child)) { gint child_min, child_nat; gtk_widget_get_preferred_height_for_width (priv->child, width, @@ -270,7 +270,7 @@ gtk_bin_size_allocate (GtkWidget *widget, gtk_widget_set_allocation (widget, allocation); - if (priv->child) + if (priv->child && gtk_widget_get_visible (priv->child)) gtk_widget_size_allocate (priv->child, allocation); } |