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;
}
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)
{