[gnome-shell/overview-relayout: 18/18] overview: Update animation



commit d55ba0a899cf2ec1189e59e366f6c42173113fec
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Nov 11 18:50:19 2010 +0100

    overview: Update animation
    
    Update the animation on entering/leaving the overview to only zoom
    the window previews and fade other elements.

 js/ui/overview.js |   33 +++++++++++++++++++--------------
 1 files changed, 19 insertions(+), 14 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 3b1e37d..6499e2b 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -262,7 +262,7 @@ Overview.prototype = {
 
     // Returns the current scale of the Overview.
     getScale : function() {
-        return this._group.scaleX;
+        return this.workspaces.actor.scaleX;
     },
 
     // Returns the current position of the Overview.
@@ -294,7 +294,7 @@ Overview.prototype = {
         this._dash.show();
 
         this.workspaces = this._workspacesDisplay.workspacesView;
-        this._group.add_actor(this.workspaces.actor);
+        global.overlay_group.add_actor(this.workspaces.actor);
 
         if (!this._desktop.child)
             this._desktop.child = this._getDesktopClone();
@@ -309,14 +309,14 @@ Overview.prototype = {
                              });
         }
 
-        // Create a zoom out effect. First scale the Overview group up and
+        // Create a zoom out effect. First scale the workspaces view up and
         // position it so that the active workspace fills up the whole screen,
-        // then transform the group to its normal dimensions and position.
+        // then transform it to its normal dimensions and position.
         // The opposite transition is used in hide().
-        this._group.scaleX = this._group.scaleY = this.getZoomedInScale();
-        [this._group.x, this._group.y] = this.getZoomedInPosition();
+        this.workspaces.actor.scaleX = this.workspaces.actor.scaleY = this.getZoomedInScale();
+        [this.workspaces.actor.x, this.workspaces.actor.y] = this.getZoomedInPosition();
         let primary = global.get_primary_monitor();
-        Tweener.addTween(this._group,
+        Tweener.addTween(this.workspaces.actor,
                          { x: primary.x,
                            y: primary.y,
                            scaleX: 1,
@@ -327,9 +327,9 @@ Overview.prototype = {
                            onCompleteScope: this
                           });
 
-        // Make Dash fade in so that it doesn't appear too big.
-        this._dash.actor.opacity = 0;
-        Tweener.addTween(this._dash.actor,
+        // Make the other elements fade in.
+        this._group.opacity = 0;
+        Tweener.addTween(this._group,
                          { opacity: 255,
                            transition: 'easeOutQuad',
                            time: ANIMATION_TIME
@@ -358,12 +358,16 @@ Overview.prototype = {
 
         this.workspaces.hide();
 
-        // Create a zoom in effect by transforming the Overview group so that
+        // Create a zoom in effect by transforming the workspaces view so that
         // the active workspace fills up the whole screen. The opposite
         // transition is used in show().
+        this.workspaces.actor.hide();
+        this.workspaces.actor.reparent(global.overlay_group);
+        this.workspaces.actor.show();
+
         let scale = this.getZoomedInScale();
         let [posX, posY] = this.getZoomedInPosition();
-        Tweener.addTween(this._group,
+        Tweener.addTween(this.workspaces.actor,
                          { x: posX,
                            y: posY,
                            scaleX: scale,
@@ -374,8 +378,8 @@ Overview.prototype = {
                            onCompleteScope: this
                           });
 
-        // Make Dash fade out so that it doesn't appear to big.
-        Tweener.addTween(this._dash.actor,
+        // Make other elements fade out.
+        Tweener.addTween(this._group,
                          { opacity: 0,
                            transition: 'easeOutQuad',
                            time: ANIMATION_TIME
@@ -411,6 +415,7 @@ Overview.prototype = {
             return;
 
         this.animationInProgress = false;
+        this.workspaces.actor.reparent(this._group);
         this._desktop.hide();
         this._coverPane.lower_bottom();
 



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