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



commit 846615c60c4350a251fb0259fbb74a366eb18fd8
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 |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 5f13d8f..1815009 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -36,10 +36,10 @@ const INACTIVE_GRID_OPACITY = 77;
 const FOLDER_SUBICON_FRACTION = .4;
 
 const MAX_APPS_PAGES = 20;
-const PAGE_SWITCH_TIME = 0.3;
 //fraction of page height the finger or mouse must reach before
 //change page
 const PAGE_SWITCH_TRESHOLD = 0.2;
+const PAGE_SWITCH_TIME = 0.25;
 
 // Recursively load a GMenuTreeDirectory; we could put this in ShellAppSystem too
 function _loadCategory(dir, list) {
@@ -312,7 +312,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]