[gnome-shell/wip/paging-release2: 7/23] appDisplay: Animate _updateIconOpacities



commit 0b4c6a85033957eba58b3352b9113ef5b4de9650
Author: Carlos Soriano <carlos soriano89 gmail com>
Date:   Thu Aug 22 17:31:41 2013 +0200

    appDisplay: Animate _updateIconOpacities
    
    Animate the transition between full opacity and partly opacity
    to follow overall animations design of gnome-shell
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706081

 js/ui/appDisplay.js |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 8c1d8b2..b68a330 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -32,6 +32,7 @@ const MENU_POPUP_TIMEOUT = 600;
 const MAX_COLUMNS = 6;
 
 const INACTIVE_GRID_OPACITY = 77;
+const INACTIVE_GRID_OPACITY_ANIMATION_TIME = 0.15;
 const FOLDER_SUBICON_FRACTION = .4;
 
 
@@ -279,10 +280,15 @@ const AllView = new Lang.Class({
 
     _updateIconOpacities: function(folderOpen) {
         for (let id in this._items) {
+            let params, opacity;
             if (folderOpen && !this._items[id].actor.checked)
-                this._items[id].actor.opacity = INACTIVE_GRID_OPACITY;
+                opacity =  INACTIVE_GRID_OPACITY;
             else
-                this._items[id].actor.opacity = 255;
+                opacity = 255;
+            params = { opacity: opacity,
+                       time: INACTIVE_GRID_OPACITY_ANIMATION_TIME,
+                       transition: 'easeOutQuad' };
+            Tweener.addTween(this._items[id].actor, params);
         }
     }
 });


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