]> Pileus Git - ~andy/gtk/commitdiff
themingengine: animate spinners again
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 10 Sep 2012 17:15:25 +0000 (13:15 -0400)
committerBenjamin Otte <otte@redhat.com>
Mon, 17 Sep 2012 18:39:13 +0000 (20:39 +0200)
Using the animation specified with CSS by the theme.

gtk/gtkthemingengine.c

index e5012a9318c730bdd72f37f31dd89fe435744300..96f8eaf4c970e2d20471ef304108556f7b5083fc 100644 (file)
@@ -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);
     }
 }