[gtk+] Do not bother starting a draw call if bar_size <= 0
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Do not bother starting a draw call if bar_size <= 0
- Date: Sun, 5 Dec 2010 12:57:46 +0000 (UTC)
commit 137f16c4c50f9b7f132d74ffa95e562c29a50651
Author: Kristian Rietveld <kris gtk org>
Date: Sun Dec 5 13:56:24 2010 +0100
Do not bother starting a draw call if bar_size <= 0
gtk/gtkcellrendererprogress.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkcellrendererprogress.c b/gtk/gtkcellrendererprogress.c
index 20abba0..f226eb7 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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]