mirror of
https://github.com/brl/mutter.git
synced 2025-02-23 16:34:10 +00:00
examples/pan-action: Animate the content reset
We can use the newly added support for implicit animations for the child transform.
This commit is contained in:
parent
48a2846ab9
commit
fb9e0466c0
@ -91,7 +91,12 @@ on_key_press (ClutterActor *stage,
|
|||||||
key_symbol = clutter_event_get_key_symbol (event);
|
key_symbol = clutter_event_get_key_symbol (event);
|
||||||
|
|
||||||
if (key_symbol == CLUTTER_KEY_space)
|
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;
|
return CLUTTER_EVENT_STOP;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user