diff options
author | Benjamin Otte <otte@redhat.com> | 2013-01-08 12:26:04 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2013-01-08 12:26:04 +0100 |
commit | da100207b3c5437ea8928a0043e75af8aa4ed936 (patch) | |
tree | 2a39390341b3bc313762f8ff99585c1720bf2816 /gtk/gtksizerequest.c | |
parent | 33e690a9ad4febbf8ad61c7fdf25a2dc36bb9629 (diff) | |
download | gtk+-da100207b3c5437ea8928a0043e75af8aa4ed936.tar.gz |
sizerequest: Make invisible widgets return a 0x0 size.
Diffstat (limited to 'gtk/gtksizerequest.c')
-rw-r--r-- | gtk/gtksizerequest.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c index 7ad94398bb..4d54821c0e 100644 --- a/gtk/gtksizerequest.c +++ b/gtk/gtksizerequest.c @@ -268,6 +268,15 @@ _gtk_widget_compute_size_for_orientation (GtkWidget *widget, gpointer key; gint min_result = 0, nat_result = 0; + if (!gtk_widget_get_visible (widget)) + { + if (minimum) + *minimum = 0; + if (natural) + *natural = 0; + return; + } + if (G_LIKELY (!_gtk_widget_get_sizegroups (widget))) { gtk_widget_query_size_for_orientation (widget, orientation, for_size, minimum, natural); |