diff options
author | Matthias Clasen <mclasen@redhat.com> | 2013-12-01 21:45:17 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-12-01 21:45:17 -0500 |
commit | 087b61f65309b5cf81480a4caa7cf36a5c5bb2db (patch) | |
tree | 8e8c8102416b41e7eb606c96dae8d2fe1a6b6657 /gtk/gtkrevealer.c | |
parent | 96c09037994eba1e846e4313c771081e7b2d33d0 (diff) | |
download | gtk+-087b61f65309b5cf81480a4caa7cf36a5c5bb2db.tar.gz |
GtkRevealer: Fix size allocation with disabled animation
When animation is disabled, we use 'none' as the effective
transition type. So far, this transition type failed to change
the size request, causing the revealer to always take up the
space of the child, even when the child is not shown.
https://bugzilla.gnome.org/show_bug.cgi?id=719568
Diffstat (limited to 'gtk/gtkrevealer.c')
-rw-r--r-- | gtk/gtkrevealer.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk/gtkrevealer.c b/gtk/gtkrevealer.c index 8ecff6c95f..07382bfa0a 100644 --- a/gtk/gtkrevealer.c +++ b/gtk/gtkrevealer.c @@ -745,7 +745,8 @@ gtk_revealer_real_get_preferred_height (GtkWidget *widget, GTK_WIDGET_CLASS (gtk_revealer_parent_class)->get_preferred_height (widget, &minimum_height, &natural_height); transition = effective_transition (revealer); - if (transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP || + if (transition == GTK_REVEALER_TRANSITION_TYPE_NONE || + transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP || transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN) natural_height = round (natural_height * priv->current_pos); @@ -772,7 +773,8 @@ gtk_revealer_real_get_preferred_height_for_width (GtkWidget *widget, GTK_WIDGET_CLASS (gtk_revealer_parent_class)->get_preferred_height_for_width (widget, width, &minimum_height, &natural_height); transition = effective_transition (revealer); - if (transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP || + if (transition == GTK_REVEALER_TRANSITION_TYPE_NONE || + transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP || transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN) natural_height = round (natural_height * priv->current_pos); @@ -798,7 +800,8 @@ gtk_revealer_real_get_preferred_width (GtkWidget *widget, GTK_WIDGET_CLASS (gtk_revealer_parent_class)->get_preferred_width (widget, &minimum_width, &natural_width); transition = effective_transition (revealer); - if (transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT || + if (transition == GTK_REVEALER_TRANSITION_TYPE_NONE || + transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT || transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT) natural_width = round (natural_width * priv->current_pos); @@ -825,7 +828,8 @@ gtk_revealer_real_get_preferred_width_for_height (GtkWidget *widget, GTK_WIDGET_CLASS (gtk_revealer_parent_class)->get_preferred_width_for_height (widget, height, &minimum_width, &natural_width); transition = effective_transition (revealer); - if (transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT || + if (transition == GTK_REVEALER_TRANSITION_TYPE_NONE || + transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT || transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT) natural_width = round (natural_width * priv->current_pos); |