[gnome-shell/wip/exalm/align] workspacesView: Round workspace position



commit b21c8c1290247e869a34427fb08927e5f2af0b6d
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sat Jan 11 01:58:24 2020 +0500

    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

 js/ui/workspacesView.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 975dd07604..2dd1ae4909 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -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;
 


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