[gnome-shell/workspace-thumbnails] Move workspaces further apart when zoomed out
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/workspace-thumbnails] Move workspaces further apart when zoomed out
- Date: Tue, 25 Jan 2011 23:38:36 +0000 (UTC)
commit 45b9621a805ab4fa50f0ec28ea62b047f32e8a83
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Tue Jan 25 18:36:01 2011 -0500
Move workspaces further apart when zoomed out
We no longer want the "see bits of adjacent workspaces" behavior when zoomed
out since:
- scrolling by bumping the ends of the screen is much less necessary
with drag to the thumbnails being possible
- We now also zoom out when we aren't dragging but merely hovering
the workspaces controls.
- it just looks weird vertically
So move the workspaces further apart when zooming out so that they are still
separated enough to be out of the clipped area.
js/ui/workspacesView.js | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 7a41ebf..66ab3fc 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -247,10 +247,8 @@ WorkspacesView.prototype = {
// actually change the actors to match
_computeWorkspacePositions: function() {
let active = global.screen.get_active_workspace_index();
-
- let scale = this._width / global.screen_width;
- if (this._zoomOut)
- scale *= this._zoomScale;
+ let zoomScale = this._zoomOut ? this._zoomScale : 1;
+ let scale = zoomScale * this._width / global.screen_width;
let _width = this._workspaces[0].actor.width * scale;
let _height = this._workspaces[0].actor.height * scale;
@@ -274,8 +272,10 @@ WorkspacesView.prototype = {
if (this._zoomOut)
workspace.x += rtl ? offset : - offset;
+ // We divide by zoomScale so that adjacent workspaces are always offscreen
+ // except when we are switching between workspaces
workspace.y = this._y + this._activeWorkspaceY
- + (w - active) * (_height + this._spacing);
+ + (w - active) * (_height + this._spacing) / zoomScale;
}
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]