diff options
author | Matthias Clasen <mclasen@redhat.com> | 2016-04-26 20:44:07 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2016-05-05 15:03:59 -0400 |
commit | 92166f1f694a0af3c8474344f47f318c7c5153aa (patch) | |
tree | 3ee8ca908271daa9b48fa417b45d8bc0a53f6c66 /gtk/gtkprogressbar.c | |
parent | 7054b0ccff7c977ad51c1f4ae13848b4704c246e (diff) | |
download | gtk+-92166f1f694a0af3c8474344f47f318c7c5153aa.tar.gz |
progressbar: Enforce invariants
When measuring gadgets, minimum must come out <= natural.
Make sure we don't fail this when measuring progressbar text.
https://bugzilla.gnome.org/show_bug.cgi?id=765644
Diffstat (limited to 'gtk/gtkprogressbar.c')
-rw-r--r-- | gtk/gtkprogressbar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c index 352d445084..74fc9b422b 100644 --- a/gtk/gtkprogressbar.c +++ b/gtk/gtkprogressbar.c @@ -805,7 +805,7 @@ gtk_progress_bar_measure_text (GtkCssGadget *gadget, else *minimum = logical_rect.width; - *natural = logical_rect.width; + *natural = MAX (*minimum, logical_rect.width); } else *minimum = *natural = logical_rect.height; |