[gnome-shell] workspaceThumbnails: Only show for more than two workspaces
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspaceThumbnails: Only show for more than two workspaces
- Date: Fri, 19 Feb 2021 01:24:20 +0000 (UTC)
commit 2fdee8e44432cd840e937bba9abf1b9af3e96ef7
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Feb 16 20:15:21 2021 +0100
workspaceThumbnails: Only show for more than two workspaces
As adjacent workspaces now peek into the window picker, the first
two workspaces are already accessible without the minimap. Hide
it in that case to give more space to the window picker, and to
not clutter the overview for users who aren't using workspaces.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3739
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1696>
js/ui/workspaceThumbnail.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index 6f009b8a08..933a0d5d4a 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -8,6 +8,8 @@ const Main = imports.ui.main;
const Util = imports.misc.util;
const Workspace = imports.ui.workspace;
+const NUM_WORKSPACES_THRESHOLD = 2;
+
// The maximum size of a thumbnail is 5% the width and height of the screen
var MAX_THUMBNAIL_SCALE = 0.05;
@@ -718,8 +720,9 @@ var ThumbnailsBox = GObject.registerClass({
_updateShouldShow() {
const { nWorkspaces } = global.workspace_manager;
- const shouldShow =
- this._settings.get_boolean('dynamic-workspaces') || nWorkspaces > 1;
+ const shouldShow = this._settings.get_boolean('dynamic-workspaces')
+ ? nWorkspaces > NUM_WORKSPACES_THRESHOLD
+ : nWorkspaces > 1;
if (this._shouldShow === shouldShow)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]