diff options
author | Kristian Rietveld <kris@gtk.org> | 2010-12-05 13:56:24 +0100 |
---|---|---|
committer | Kristian Rietveld <kris@gtk.org> | 2010-12-05 13:57:04 +0100 |
commit | 137f16c4c50f9b7f132d74ffa95e562c29a50651 (patch) | |
tree | 61add0741c553f83cef32e1209a2ca97e154728e /gtk/gtkcellrendererprogress.c | |
parent | 86c8ce1cc0de6b9529462ab1f1840c3439677957 (diff) | |
download | gtk+-137f16c4c50f9b7f132d74ffa95e562c29a50651.tar.gz |
Do not bother starting a draw call if bar_size <= 0
Diffstat (limited to 'gtk/gtkcellrendererprogress.c')
-rw-r--r-- | gtk/gtkcellrendererprogress.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gtk/gtkcellrendererprogress.c b/gtk/gtkcellrendererprogress.c index 20abba0fcd..f226eb7c22 100644 --- a/gtk/gtkcellrendererprogress.c +++ b/gtk/gtkcellrendererprogress.c @@ -604,12 +604,13 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell, clip.y = bar_position; } - gtk_paint_box (style, - cr, - GTK_STATE_SELECTED, GTK_SHADOW_OUT, - widget, "bar", - clip.x, clip.y, - clip.width, clip.height); + if (bar_size > 0) + gtk_paint_box (style, + cr, + GTK_STATE_SELECTED, GTK_SHADOW_OUT, + widget, "bar", + clip.x, clip.y, + clip.width, clip.height); if (priv->label) { |