workspacesView: Round workspace position
Prevent blurring when scrolling workspaces by aligning it to pixel grid, and be consistent with app grid. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/930
This commit is contained in:
parent
4c6a0678ff
commit
b21c8c1290
@ -314,7 +314,7 @@ class WorkspacesView extends WorkspacesViewBase {
|
||||
let workspacesHeight = lastWorkspaceY - firstWorkspaceY;
|
||||
|
||||
let currentY = firstWorkspaceY;
|
||||
let newY = -adj.value / (adj.upper - 1) * workspacesHeight;
|
||||
let newY = -Math.round(adj.value / (adj.upper - 1) * workspacesHeight);
|
||||
|
||||
let dy = newY - currentY;
|
||||
|
||||
@ -328,7 +328,7 @@ class WorkspacesView extends WorkspacesViewBase {
|
||||
let workspacesWidth = lastWorkspaceX - firstWorkspaceX;
|
||||
|
||||
let currentX = firstWorkspaceX;
|
||||
let newX = -adj.value / (adj.upper - 1) * workspacesWidth;
|
||||
let newX = -Math.round(adj.value / (adj.upper - 1) * workspacesWidth);
|
||||
|
||||
let dx = newX - currentX;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user