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>
This commit is contained in:
Georges Basile Stavracas Neto 2020-12-29 18:51:40 -03:00 committed by Marge Bot
parent 26c5434222
commit 1359b272a4
2 changed files with 10 additions and 0 deletions

View File

@ -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) {

View File

@ -967,4 +967,8 @@ class WorkspacesDisplay extends St.Widget {
Main.wm.actionMoveWorkspace(ws);
return Clutter.EVENT_STOP;
}
get fitModeAdjustment() {
return this._fitModeAdjustment;
}
});