[gtk+] bin: Only handle size for the child if it is visible
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] bin: Only handle size for the child if it is visible
- Date: Sun, 11 Nov 2012 19:27:32 +0000 (UTC)
commit b0f3aa82b7759bb9a84d8f354846b8020ed0f989
Author: Benjamin Otte <otte redhat com>
Date: Sun Nov 11 19:30:11 2012 +0100
bin: Only handle size for the child if it is visible
gtk/gtkbin.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c
index e17d2be..11b46f4 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]