[gnome-shell] workspaceView: Make sure to scale the workspace proportionally
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspaceView: Make sure to scale the workspace proportionally
- Date: Tue, 15 Mar 2011 18:05:04 +0000 (UTC)
commit a9505d0426bfc092983bb0023425280a63f3ed77
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Mar 11 19:03:20 2011 -0500
workspaceView: Make sure to scale the workspace proportionally
Commit 0207f1f29b776ae5f8f59321284f1adc2f85159e landed a new
way of zooming, but was causing all sorts of window positioning
weirdness because the positions were supposed to be working against
a proportional workspace.
https://bugzilla.gnome.org/show_bug.cgi?id=644542
js/ui/workspacesView.js | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 3f79ec8..2d63ed1 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -708,8 +708,11 @@ WorkspacesDisplay.prototype = {
if (!this.workspacesView)
return;
- let width = this.actor.allocation.x2 - this.actor.allocation.x1;
- let height = this.actor.allocation.y2 - this.actor.allocation.y1;
+ let fullWidth = this.actor.allocation.x2 - this.actor.allocation.x1;
+ let fullHeight = this.actor.allocation.y2 - this.actor.allocation.y1;
+
+ let width = fullWidth;
+ let height = fullHeight;
let [controlsMin, controlsNatural] = this._controls.get_preferred_width(height);
let controlsVisible = this._controls.get_theme_node().get_length('visible-width');
@@ -728,6 +731,9 @@ WorkspacesDisplay.prototype = {
x += controlsVisible;
}
+ height = (fullHeight / fullWidth) * width;
+ y += (fullHeight - height) / 2;
+
this.workspacesView.setGeometry(x, y, width, height);
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]