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();
|
this._workspacesDisplay.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prepareToEnterOverview() {
|
||||||
|
this._searchController.prepareToEnterOverview();
|
||||||
|
this._workspacesDisplay.prepareToEnterOverview();
|
||||||
|
}
|
||||||
|
|
||||||
|
prepareToLeaveOverview() {
|
||||||
|
this._workspacesDisplay.prepareToLeaveOverview();
|
||||||
|
}
|
||||||
|
|
||||||
animateToOverview(state, callback) {
|
animateToOverview(state, callback) {
|
||||||
this._ignoreShowAppsButtonToggle = true;
|
this._ignoreShowAppsButtonToggle = true;
|
||||||
|
|
||||||
this._searchController.prepareToEnterOverview();
|
this.prepareToEnterOverview();
|
||||||
this._workspacesDisplay.prepareToEnterOverview();
|
|
||||||
|
|
||||||
this._stateAdjustment.value = ControlsState.HIDDEN;
|
this._stateAdjustment.value = ControlsState.HIDDEN;
|
||||||
this._stateAdjustment.ease(state, {
|
this._stateAdjustment.ease(state, {
|
||||||
@ -740,7 +748,7 @@ class ControlsManager extends St.Widget {
|
|||||||
animateFromOverview(callback) {
|
animateFromOverview(callback) {
|
||||||
this._ignoreShowAppsButtonToggle = true;
|
this._ignoreShowAppsButtonToggle = true;
|
||||||
|
|
||||||
this._workspacesDisplay.prepareToLeaveOverview();
|
this.prepareToLeaveOverview();
|
||||||
|
|
||||||
this._stateAdjustment.ease(ControlsState.HIDDEN, {
|
this._stateAdjustment.ease(ControlsState.HIDDEN, {
|
||||||
duration: Overview.ANIMATION_TIME,
|
duration: Overview.ANIMATION_TIME,
|
||||||
@ -775,8 +783,7 @@ class ControlsManager extends St.Widget {
|
|||||||
this._stateAdjustment.remove_transition('value');
|
this._stateAdjustment.remove_transition('value');
|
||||||
|
|
||||||
tracker.confirmSwipe(baseDistance, points, progress, cancelProgress);
|
tracker.confirmSwipe(baseDistance, points, progress, cancelProgress);
|
||||||
this._workspacesDisplay.prepareToEnterOverview();
|
this.prepareToEnterOverview();
|
||||||
this._searchController.prepareToEnterOverview();
|
|
||||||
this._stateAdjustment.gestureInProgress = true;
|
this._stateAdjustment.gestureInProgress = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -786,7 +793,7 @@ class ControlsManager extends St.Widget {
|
|||||||
|
|
||||||
gestureEnd(target, duration, onComplete) {
|
gestureEnd(target, duration, onComplete) {
|
||||||
if (target === ControlsState.HIDDEN)
|
if (target === ControlsState.HIDDEN)
|
||||||
this._workspacesDisplay.prepareToLeaveOverview();
|
this.prepareToLeaveOverview();
|
||||||
|
|
||||||
this.dash.showAppsButton.checked =
|
this.dash.showAppsButton.checked =
|
||||||
target === ControlsState.APP_GRID;
|
target === ControlsState.APP_GRID;
|
||||||
@ -804,8 +811,7 @@ class ControlsManager extends St.Widget {
|
|||||||
async runStartupAnimation(callback) {
|
async runStartupAnimation(callback) {
|
||||||
this._ignoreShowAppsButtonToggle = true;
|
this._ignoreShowAppsButtonToggle = true;
|
||||||
|
|
||||||
this._searchController.prepareToEnterOverview();
|
this.prepareToEnterOverview();
|
||||||
this._workspacesDisplay.prepareToEnterOverview();
|
|
||||||
|
|
||||||
this._stateAdjustment.value = ControlsState.HIDDEN;
|
this._stateAdjustment.value = ControlsState.HIDDEN;
|
||||||
this._stateAdjustment.ease(ControlsState.WINDOW_PICKER, {
|
this._stateAdjustment.ease(ControlsState.WINDOW_PICKER, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user