[gnome-shell] viewSelector: Tie workspace fit mode to adjustment



commit 1359b272a4f9db85a93160b3fe058cfcb7493b85
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Dec 29 18:51:40 2020 -0300

    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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1613>

 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 72f068aa49..b120618892 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 3f3cc3edbc..93782f431b 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;
+    }
 });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]