[gnome-shell/wip/rewindow: 3/10] workspacesView: Don't conform to aspect ratio



commit b4f60399c98c8c389d01d02521464cd34bf9000d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Aug 9 12:38:36 2012 -0300

    workspacesView: Don't conform to aspect ratio
    
    We want the window picker to use the full height of the area it's given.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=582650

 js/ui/workspacesView.js |   19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index f769186..7d907c6 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -51,7 +51,6 @@ const WorkspacesView = new Lang.Class({
         this._clipY = 0;
         this._clipWidth = 0;
         this._clipHeight = 0;
-        this._workspaceRatioSpacing = 0;
         this._spacing = 0;
         this._animating = false; // tweening
         this._scrolling = false; // swipe-scrolling
@@ -147,15 +146,15 @@ const WorkspacesView = new Lang.Class({
         this._extraWorkspaces = null;
     },
 
-    setGeometry: function(x, y, width, height, spacing) {
+    setGeometry: function(x, y, width, height) {
       if (this._x == x && this._y == y &&
           this._width == width && this._height == height)
           return;
+
         this._width = width;
         this._height = height;
         this._x = x;
         this._y = y;
-        this._workspaceRatioSpacing = spacing;
 
         for (let i = 0; i < this._workspaces.length; i++)
             this._workspaces[i].setGeometry(x, y, width, height);
@@ -234,7 +233,7 @@ const WorkspacesView = new Lang.Class({
 
             Tweener.removeTweens(workspace.actor);
 
-            let y = (w - active) * (this._height + this._spacing + this._workspaceRatioSpacing);
+            let y = (w - active) * (this._height + this._spacing);
 
             if (showAnimation) {
                 let params = { y: y,
@@ -866,7 +865,7 @@ const WorkspacesDisplay = new Lang.Class({
         let rtl = (Clutter.get_default_text_direction () == Clutter.TextDirection.RTL);
 
         let clipWidth = width - controlsVisible;
-        let clipHeight = (fullHeight / fullWidth) * clipWidth;
+        let clipHeight = fullHeight;
         let clipX = rtl ? x + controlsVisible : x;
         let clipY = y + (fullHeight - clipHeight) / 2;
 
@@ -880,19 +879,13 @@ const WorkspacesDisplay = new Lang.Class({
                 x += controlsVisible;
         }
 
-        height = (fullHeight / fullWidth) * width;
-        let difference = fullHeight - height;
-        y += difference / 2;
-
-
         let monitors = Main.layoutManager.monitors;
         let m = 0;
         for (let i = 0; i < monitors.length; i++) {
             if (i == this._primaryIndex) {
                 this._workspacesViews[m].setClipRect(clipX, clipY,
                                                      clipWidth, clipHeight);
-                this._workspacesViews[m].setGeometry(x, y, width, height,
-                                                     difference);
+                this._workspacesViews[m].setGeometry(x, y, width, height);
                 m++;
             } else if (!this._workspacesOnlyOnPrimary) {
                 this._workspacesViews[m].setClipRect(monitors[i].x,
@@ -902,7 +895,7 @@ const WorkspacesDisplay = new Lang.Class({
                 this._workspacesViews[m].setGeometry(monitors[i].x,
                                                      monitors[i].y,
                                                      monitors[i].width,
-                                                     monitors[i].height, 0);
+                                                     monitors[i].height);
                 m++;
             }
         }



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