From 1359b272a4f9db85a93160b3fe058cfcb7493b85 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Tue, 29 Dec 2020 18:51:40 -0300 Subject: [PATCH] viewSelector: Tie workspace fit mode to adjustment Tie the fit mode adjustment of WorkspacesDisplay to the state adjustment of AppPagesContainer, and transition to the ALL fit mode when the app grid is visible. Part-of: --- js/ui/viewSelector.js | 6 ++++++ js/ui/workspacesView.js | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js index 72f068aa4..b12061889 100644 --- a/js/ui/viewSelector.js +++ b/js/ui/viewSelector.js @@ -181,6 +181,12 @@ class ActivitiesContainer extends St.Widget { opacity: Util.lerp(0, 255, 1 - progress), visible: (1 - progress) !== 0, }); + + const { fitModeAdjustment } = this._workspacesDisplay; + fitModeAdjustment.value = Util.lerp( + WorkspacesView.FitMode.SINGLE, + WorkspacesView.FitMode.ALL, + progress); } _getWorkspacesBoxes(box, thumbnailsHeight) { diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index 3f3cc3edb..93782f431 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -967,4 +967,8 @@ class WorkspacesDisplay extends St.Widget { Main.wm.actionMoveWorkspace(ws); return Clutter.EVENT_STOP; } + + get fitModeAdjustment() { + return this._fitModeAdjustment; + } });