[gnome-shell] workspacesView: Take scale factor into account to calculate spacing
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspacesView: Take scale factor into account to calculate spacing
- Date: Sun, 21 Feb 2021 16:30:41 +0000 (UTC)
commit 63a96a7111a5ba775eafffaa9dc97754a9752584
Author: Jonas Dreßler <verdre v0yd nl>
Date: Fri Feb 19 19:20:32 2021 +0100
workspacesView: Take scale factor into account to calculate spacing
This is a statically defined size and we need to adjust for scaleFactor
ourselves, so do that and multiply those two values by the scale factor.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1701>
js/ui/workspacesView.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index c4b3d82528..fb9eafb0a8 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -228,8 +228,10 @@ class WorkspacesView extends WorkspacesViewBase {
}
const spacing = (availableSpace - workspaceSize * 0.05) * (1 - fitMode);
+ const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
- return Math.clamp(spacing, WORKSPACE_MIN_SPACING, WORKSPACE_MAX_SPACING);
+ return Math.clamp(spacing, WORKSPACE_MIN_SPACING * scaleFactor,
+ WORKSPACE_MAX_SPACING * scaleFactor);
}
_getWorkspaceModeForOverviewState(state) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]