Do not bother starting a draw call if bar_size <= 0

This commit is contained in:
Kristian Rietveld
2010-12-05 13:56:24 +01:00
parent 86c8ce1cc0
commit 137f16c4c5

View File

@ -604,12 +604,13 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
clip.y = bar_position; clip.y = bar_position;
} }
gtk_paint_box (style, if (bar_size > 0)
cr, gtk_paint_box (style,
GTK_STATE_SELECTED, GTK_SHADOW_OUT, cr,
widget, "bar", GTK_STATE_SELECTED, GTK_SHADOW_OUT,
clip.x, clip.y, widget, "bar",
clip.width, clip.height); clip.x, clip.y,
clip.width, clip.height);
if (priv->label) if (priv->label)
{ {