[gnome-control-center/wip/animated-notebook] shell: Add transition



commit 7966b04c133b73e7fe1835719806d19154bca9d4
Author: Bastien Nocera <hadess hadess net>
Date:   Thu May 3 15:48:34 2012 +0100

    shell: Add transition

 shell/cc-notebook.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/shell/cc-notebook.c b/shell/cc-notebook.c
index 3a7b88c..06cd9d6 100644
--- a/shell/cc-notebook.c
+++ b/shell/cc-notebook.c
@@ -315,8 +315,14 @@ cc_notebook_select_page_at_index (CcNotebook *self,
 	pos.y = 0;
 	pos.x = self->priv->last_width * index_;
         g_message ("scrolling to %lfx%lf (item %d)", pos.x, pos.y, index_);
+
+        clutter_actor_save_easing_state (self->priv->scroll);
+        clutter_actor_set_easing_duration (self->priv->scroll, 500);
+
         clutter_scroll_actor_scroll_to_point (CLUTTER_SCROLL_ACTOR (self->priv->scroll), &pos);
 
+	clutter_actor_restore_easing_state (self->priv->scroll);
+
         /* Remember the last selected page */
 	frame = clutter_actor_get_child_at_index (self->priv->bin, self->priv->selected_index);
 	g_assert (frame != NULL);



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