[gtk+/composite-templates] themingengine: animate spinners again



commit 0b5802109488f216f3389c6b731893fe29937bc7
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Sep 10 13:15:25 2012 -0400

    themingengine: animate spinners again
    
    Using the animation specified with CSS by the theme.

 gtk/gtkthemingengine.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index e5012a9..96f8eaf 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -2644,13 +2644,18 @@ gtk_theming_engine_render_activity (GtkThemingEngine *engine,
                                     gdouble           width,
                                     gdouble           height)
 {
-  if (gtk_theming_engine_has_class (engine, GTK_STYLE_CLASS_SPINNER))
+  GtkThemingBackground bg;
+  
+  _gtk_theming_background_init (&bg, engine, x, y, width, height, 0);
+  
+  if (gtk_theming_engine_has_class (engine, GTK_STYLE_CLASS_SPINNER) &&
+      !_gtk_theming_background_has_background_image (&bg))
     {
       render_spinner (engine, cr, x, y, width, height);
     }
   else
     {
-      gtk_theming_engine_render_background (engine, cr, x, y, width, height);
+      _gtk_theming_background_render (&bg, cr);
       gtk_theming_engine_render_frame (engine, cr, x, y, width, height);
     }
 }



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