[gnome-shell] wip: cross fade the window_group and window clones going in/out of the overview



commit 162559159827227d418afd1f712f79c1d3a4a353
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Jul 4 18:35:01 2011 +0100

    wip: cross fade the window_group and window clones going in/out of the overview
    
    https://bugzilla.gnome.org/show_bug.cgi?id=653868

 js/ui/overview.js  |   20 +++++++++++++++++---
 js/ui/workspace.js |   37 ++++++++++++++++++++++++++-----------
 2 files changed, 43 insertions(+), 14 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 085f292..37c90c3 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -535,7 +535,15 @@ Overview.prototype = {
         //
         // If we switched to displaying the actors in the Overview rather than
         // clones of them, this would obviously no longer be necessary.
-        global.window_group.hide();
+
+        global.window_group.raise(global.overlay_group);
+        Tweener.addTween(global.window_group,
+                         { opacity: 0,
+                           time: ANIMATION_TIME,
+                           transition: 'easeInOutQuad',
+                           onComplete: function() { global.window_group.hide(); }
+                         });
+
         this._group.show();
         this._background.show();
 
@@ -664,6 +672,14 @@ Overview.prototype = {
         this.animationInProgress = true;
         this._hideInProgress = true;
 
+        global.window_group.raise(global.overlay_group);
+        global.window_group.show();
+        Tweener.addTween(global.window_group,
+                         { opacity: 255,
+                           time: ANIMATION_TIME,
+                           transition: 'easeInOutQuad'
+                         });
+
         if (!this.workspaces.getActiveWorkspace().hasMaximizedWindows()) {
             this._desktopFade.opacity = 0;
             this._desktopFade.show();
@@ -704,8 +720,6 @@ Overview.prototype = {
     },
 
     _hideDone: function() {
-        global.window_group.show();
-
         this.workspaces.destroy();
         this.workspaces = null;
 
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index e6c65b9..0c17485 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -973,17 +973,28 @@ Workspace.prototype = {
                                       });
                 }
 
+                clone.actor.opacity = 0;
                 Tweener.addTween(clone.actor,
-                                 { x: x,
-                                   y: y,
-                                   scale_x: scale,
-                                   scale_y: scale,
+                                 { opacity: 255,
                                    time: Overview.ANIMATION_TIME,
-                                   transition: 'easeOutQuad',
+                                   transition: 'easeInOutQuad',
                                    onComplete: Lang.bind(this, function() {
                                       this._showWindowOverlay(clone, overlay, true);
                                    })
                                  });
+                // Tweener.addTween(clone.actor,
+                //                  { x: x,
+                //                    y: y,
+                //                    scale_x: scale,
+                //                    scale_y: scale,
+                //                    time: Overview.ANIMATION_TIME,
+                //                    transition: 'easeInOutQuad',
+                //                    onComplete: Lang.bind(this, function() {
+                //                       this._showWindowOverlay(clone, overlay, true);
+                //                    })
+                //                  });
+                clone.actor.set_position(x, y);
+                clone.actor.set_scale(scale, scale);
             } else {
                 clone.actor.set_position(x, y);
                 clone.actor.set_scale(scale, scale);
@@ -1248,14 +1259,18 @@ Workspace.prototype = {
 
             if (clone.metaWindow.showing_on_its_workspace()) {
                 Tweener.addTween(clone.actor,
-                                 { x: clone.origX,
-                                   y: clone.origY,
-                                   scale_x: 1.0,
-                                   scale_y: 1.0,
+                                 { opacity: 0,
                                    time: Overview.ANIMATION_TIME,
-                                   opacity: 255,
-                                   transition: 'easeOutQuad'
+                                   transition: 'easeInOutQuad'
                                  });
+                // Tweener.addTween(clone.actor,
+                //                  { x: clone.origX,
+                //                    y: clone.origY,
+                //                    scale_x: 1.0,
+                //                    scale_y: 1.0,
+                //                    time: Overview.ANIMATION_TIME,
+                //                    transition: 'easeInOutQuad'
+                //                  });
             } else {
                 // The window is hidden, make it shrink and fade it out
                 Tweener.addTween(clone.actor,



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