workspaceView: Make sure to scale the workspace proportionally
Commit 0207f1f29b
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
This commit is contained in:
parent
4d804c2a29
commit
a9505d0426
@ -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);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user