[gtk+] theme: Do general cairo setup in one place



commit 8c8dda6a6bab8d5a334faeefc909b6153bb364b0
Author: Benjamin Otte <otte redhat com>
Date:   Sat Mar 5 14:47:55 2011 +0100

    theme: Do general cairo setup in one place
    
    Also remove wrong comment.

 gtk/gtkthemingengine.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index edd3a60..bd32c90 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -2991,10 +2991,9 @@ gtk_theming_engine_render_activity (GtkThemingEngine *engine,
 
       cairo_save (cr);
 
-      cairo_translate (cr, x + width / 2, y + height / 2);
-
-      /* draw clip region */
       cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
+      cairo_set_line_width (cr, 2.0);
+      cairo_translate (cr, x + width / 2, y + height / 2);
 
       radius = MIN (width / 2, height / 2);
       half = num_steps / 2;
@@ -3013,7 +3012,6 @@ gtk_theming_engine_render_activity (GtkThemingEngine *engine,
                                  color->blue,
                                  color->alpha * t);
 
-          cairo_set_line_width (cr, 2.0);
           cairo_move_to (cr,
                          (radius - inset) * cos (i * G_PI / half),
                          (radius - inset) * sin (i * G_PI / half));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]