diff options
author | Stefano Facchini <stefano.facchini@gmail.com> | 2013-08-28 00:13:55 +0200 |
---|---|---|
committer | Stefano Facchini <stefano.facchini@gmail.com> | 2013-08-28 10:34:11 +0200 |
commit | b2b8c4d4bce6ed7047cde923b97cda6d80a250d6 (patch) | |
tree | 57891463c7b728ddd04a3d2f0cfd310f1479366e /gtk/gtkrevealer.c | |
parent | b264d27c4fb5f4937ea070ba122a344acc605b14 (diff) | |
download | gtk+-b2b8c4d4bce6ed7047cde923b97cda6d80a250d6.tar.gz |
revealer: clamp minimum size to natural one
Instead of just setting them equal.
https://bugzilla.gnome.org/show_bug.cgi?id=706938
Diffstat (limited to 'gtk/gtkrevealer.c')
-rw-r--r-- | gtk/gtkrevealer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkrevealer.c b/gtk/gtkrevealer.c index e97572586c..f90479e506 100644 --- a/gtk/gtkrevealer.c +++ b/gtk/gtkrevealer.c @@ -726,7 +726,7 @@ gtk_revealer_real_get_preferred_height (GtkWidget *widget, transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN) natural_height = round (natural_height * priv->current_pos); - minimum_height = natural_height; + minimum_height = MIN (minimum_height, natural_height); if (minimum_height_out) *minimum_height_out = minimum_height; @@ -753,7 +753,7 @@ gtk_revealer_real_get_preferred_height_for_width (GtkWidget *widget, transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN) natural_height = round (natural_height * priv->current_pos); - minimum_height = natural_height; + minimum_height = MIN (minimum_height, natural_height); if (minimum_height_out) *minimum_height_out = minimum_height; @@ -779,7 +779,7 @@ gtk_revealer_real_get_preferred_width (GtkWidget *widget, transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT) natural_width = round (natural_width * priv->current_pos); - minimum_width = natural_width; + minimum_width = MIN (minimum_width, natural_width); if (minimum_width_out) *minimum_width_out = minimum_width; @@ -806,7 +806,7 @@ gtk_revealer_real_get_preferred_width_for_height (GtkWidget *widget, transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT) natural_width = round (natural_width * priv->current_pos); - minimum_width = natural_width; + minimum_width = MIN (minimum_width, natural_width); if (minimum_width_out) *minimum_width_out = minimum_width; |