summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2012-09-03 21:01:24 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2012-09-03 21:01:24 +0100
commitfb9e0466c07db48bc68ac04ebf346bad5aee1ad4 (patch)
tree66dcabcb438a4bec7450ba365445b8f7db735cb8 /examples
parent48a2846ab99a9c2fff2ec80342dbc2314eca04ad (diff)
downloadclutter-fb9e0466c07db48bc68ac04ebf346bad5aee1ad4.tar.gz
examples/pan-action: Animate the content reset
We can use the newly added support for implicit animations for the child transform.
Diffstat (limited to 'examples')
-rw-r--r--examples/pan-action.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/pan-action.c b/examples/pan-action.c
index 2eb382d64..642a39df0 100644
--- a/examples/pan-action.c
+++ b/examples/pan-action.c
@@ -91,7 +91,12 @@ on_key_press (ClutterActor *stage,
key_symbol = clutter_event_get_key_symbol (event);
if (key_symbol == CLUTTER_KEY_space)
- clutter_actor_set_child_transform (scroll, NULL);
+ {
+ clutter_actor_save_easing_state (scroll);
+ clutter_actor_set_easing_duration (scroll, 1000);
+ clutter_actor_set_child_transform (scroll, NULL);
+ clutter_actor_restore_easing_state (scroll);
+ }
return CLUTTER_EVENT_STOP;
}