overviewControls: Group prepare to enter/leave overview code
Move preparation code into their own functions. These functions will be used in order to separate the animation control into two steps. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2532>
This commit is contained in:
parent
63904a09bf
commit
b8b8919563
@ -715,11 +715,19 @@ class ControlsManager extends St.Widget {
|
||||
this._workspacesDisplay.hide();
|
||||
}
|
||||
|
||||
prepareToEnterOverview() {
|
||||
this._searchController.prepareToEnterOverview();
|
||||
this._workspacesDisplay.prepareToEnterOverview();
|
||||
}
|
||||
|
||||
prepareToLeaveOverview() {
|
||||
this._workspacesDisplay.prepareToLeaveOverview();
|
||||
}
|
||||
|
||||
animateToOverview(state, callback) {
|
||||
this._ignoreShowAppsButtonToggle = true;
|
||||
|
||||
this._searchController.prepareToEnterOverview();
|
||||
this._workspacesDisplay.prepareToEnterOverview();
|
||||
this.prepareToEnterOverview();
|
||||
|
||||
this._stateAdjustment.value = ControlsState.HIDDEN;
|
||||
this._stateAdjustment.ease(state, {
|
||||
@ -740,7 +748,7 @@ class ControlsManager extends St.Widget {
|
||||
animateFromOverview(callback) {
|
||||
this._ignoreShowAppsButtonToggle = true;
|
||||
|
||||
this._workspacesDisplay.prepareToLeaveOverview();
|
||||
this.prepareToLeaveOverview();
|
||||
|
||||
this._stateAdjustment.ease(ControlsState.HIDDEN, {
|
||||
duration: Overview.ANIMATION_TIME,
|
||||
@ -775,8 +783,7 @@ class ControlsManager extends St.Widget {
|
||||
this._stateAdjustment.remove_transition('value');
|
||||
|
||||
tracker.confirmSwipe(baseDistance, points, progress, cancelProgress);
|
||||
this._workspacesDisplay.prepareToEnterOverview();
|
||||
this._searchController.prepareToEnterOverview();
|
||||
this.prepareToEnterOverview();
|
||||
this._stateAdjustment.gestureInProgress = true;
|
||||
}
|
||||
|
||||
@ -786,7 +793,7 @@ class ControlsManager extends St.Widget {
|
||||
|
||||
gestureEnd(target, duration, onComplete) {
|
||||
if (target === ControlsState.HIDDEN)
|
||||
this._workspacesDisplay.prepareToLeaveOverview();
|
||||
this.prepareToLeaveOverview();
|
||||
|
||||
this.dash.showAppsButton.checked =
|
||||
target === ControlsState.APP_GRID;
|
||||
@ -804,8 +811,7 @@ class ControlsManager extends St.Widget {
|
||||
async runStartupAnimation(callback) {
|
||||
this._ignoreShowAppsButtonToggle = true;
|
||||
|
||||
this._searchController.prepareToEnterOverview();
|
||||
this._workspacesDisplay.prepareToEnterOverview();
|
||||
this.prepareToEnterOverview();
|
||||
|
||||
this._stateAdjustment.value = ControlsState.HIDDEN;
|
||||
this._stateAdjustment.ease(ControlsState.WINDOW_PICKER, {
|
||||
|
Loading…
Reference in New Issue
Block a user