[gnome-shell/wip/paging-release: 6/85] AppDisplay: Add tweener for change pages



commit b9fbf56d63ba7026af2a93aeae3c33336dc0a162
Author: Carlos Soriano <carlos soriano89 gmail com>
Date:   Wed Jun 26 10:40:45 2013 +0200

    AppDisplay: Add tweener for change pages

 js/ui/appDisplay.js |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index aed4c72..b380778 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -36,6 +36,7 @@ const INACTIVE_GRID_OPACITY = 77;
 const FOLDER_SUBICON_FRACTION = .4;
 
 const MAX_APPS_PAGES = 20;
+const PAGE_SWITCH_TIME = 0.25;
 
 
 // Recursively load a GMenuTreeDirectory; we could put this in ShellAppSystem too
@@ -309,7 +310,11 @@ const PaginationScrollView = new Lang.Class({
         
         if(pageNumber < this._pages.nPages() && pageNumber >= 0) {
             this._currentPage = pageNumber;
-            this.vscroll.adjustment.set_value(this._pages.getPagePosition(this._currentPage)[1]);
+            let params = { value: this._pages.getPagePosition(this._currentPage)[1],
+                           time: PAGE_SWITCH_TIME,
+                           transition: 'easeOutQuad'
+                          };
+            Tweener.addTween(this.vscroll.adjustment, params);
         }
     },
     


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