[gnome-shell] workspacesView: Fix off-by-one error
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspacesView: Fix off-by-one error
- Date: Wed, 27 Jan 2021 00:45:19 +0000 (UTC)
commit 9f0e7632a6e1cb94bb9bf71002d548a8cbb2d558
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jan 8 02:14:42 2021 +0100
workspacesView: Fix off-by-one error
The scroll adjustment's upper value corresponds to the number of
workspaces, not to the last workspace index. We want the latter
when mirroring the layout in RTL locales, so subtract 1.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1598>
js/ui/workspacesView.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 865b52b502..12f5ca3a81 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -300,7 +300,7 @@ class WorkspacesView extends WorkspacesViewBase {
const vertical = workspaceManager.layout_rows === -1;
const rtl = this.text_direction === Clutter.TextDirection.RTL;
const progress = vertical || !rtl
- ? adj.value : adj.upper - adj.value;
+ ? adj.value : adj.upper - adj.value - 1;
for (const ws of this._workspaces) {
if (vertical)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]