[gnome-shell] workspace: Align window previews with the pixel grid



commit a02399eea4a3fbf46aa3be35198f6ad3b861e6c8
Author: Sebastian Keller <skeller src gnome org>
Date:   Tue Aug 22 19:05:11 2017 +0200

    workspace: Align window previews with the pixel grid
    
    Now that full-sized window previews are allowed again it makes sense to
    align the window previews with the pixel grid to prevent unscaled
    windows from looking blurry in the overview.

 js/ui/workspace.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index eb24e25..e6a6da9 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -948,6 +948,10 @@ var LayoutStrategy = new Lang.Class({
                 let cloneX = x + (cellWidth - cloneWidth) / 2;
                 let cloneY = row.y + row.height * row.additionalScale - cellHeight + compensation;
 
+                // Align with the pixel grid to prevent blurry windows at scale = 1
+                cloneX = Math.floor(cloneX);
+                cloneY = Math.floor(cloneY);
+
                 slots.push([cloneX, cloneY, s, window]);
                 x += cellWidth + this._columnSpacing;
             }


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