[gnome-shell/wip/exalm/align: 2/2] workspacesView: Round workspace position
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/exalm/align: 2/2] workspacesView: Round workspace position
- Date: Fri, 10 Jan 2020 21:43:45 +0000 (UTC)
commit 9f8a205501b594605b404b2e08936a791359c826
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 | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 975dd07604..619e8ab921 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;
@@ -553,6 +553,7 @@ class WorkspacesDisplay extends St.Widget {
_switchWorkspaceUpdate(tracker, progress) {
let adjustment = this._scrollAdjustment;
adjustment.value = progress * adjustment.page_size;
+ log("WTF ", adjustment.page_size);
}
_switchWorkspaceEnd(tracker, duration, endProgress) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]