[libchamplain] Perform fade-in animation on ChamplainTile and not the containing actor



commit ce1bf37f80d9d5369c4e142663d259a5f1a9b8a4
Author: JiÅ?í Techet <techet gmail com>
Date:   Sat Feb 12 15:39:33 2011 +0100

    Perform fade-in animation on ChamplainTile and not the containing actor
    
    Under GTK 3 if we perform the animation on the content actor,
    the animation doesn't work properly. For now it remains mystery
    why this happens. At the moment we are fine with this solution
    but if we implement some better zoom-in/out animation that
    fades-in the loaded tile into the scaled tile from the previous
    zoom level, we may need to animate the new content actor on top
    of the old content actor inside the tile.

 champlain/champlain-tile.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/champlain/champlain-tile.c b/champlain/champlain-tile.c
index 405b9f6..ab93e43 100644
--- a/champlain/champlain-tile.c
+++ b/champlain/champlain-tile.c
@@ -900,11 +900,12 @@ champlain_tile_display_content (ChamplainTile *self)
   if (!priv->content_actor)
     return;
 
-  clutter_actor_set_opacity (priv->content_actor, 0);
   clutter_container_add_actor (CLUTTER_CONTAINER (priv->content_group), priv->content_actor);
+
+  clutter_actor_set_opacity (CLUTTER_ACTOR (self), 0);
   if (priv->fade_in)
     {
-      animation = clutter_actor_animate (priv->content_actor,
+      animation = clutter_actor_animate (CLUTTER_ACTOR (self),
           CLUTTER_EASE_IN_CUBIC,
           500,
           "opacity", 255,
@@ -912,7 +913,7 @@ champlain_tile_display_content (ChamplainTile *self)
     }
   else
     {
-      animation = clutter_actor_animate (priv->content_actor,
+      animation = clutter_actor_animate (CLUTTER_ACTOR (self),
           CLUTTER_LINEAR,
           150,
           "opacity", 255,



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