workspace, workspacesView: Cleanup animation methods
Remove Workspace.zoomTo/FromOverview(), they're unused now. Rename everything up to ControlsManager to prepareToEnter/LeaveOverview(), since these classes don't run the animation anymore. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>
This commit is contained in:

committed by
Marge Bot

parent
d221215ab6
commit
22f4a6b7f6
@ -6,7 +6,6 @@ const { Clutter, GLib, GObject, Graphene, Meta, St } = imports.gi;
|
||||
const Background = imports.ui.background;
|
||||
const DND = imports.ui.dnd;
|
||||
const Main = imports.ui.main;
|
||||
const Overview = imports.ui.overview;
|
||||
const Params = imports.misc.params;
|
||||
const Util = imports.misc.util;
|
||||
const { WindowPreview } = imports.ui.windowPreview;
|
||||
@ -1154,17 +1153,6 @@ class Workspace extends St.Widget {
|
||||
return false;
|
||||
}
|
||||
|
||||
zoomToOverview() {
|
||||
const animate =
|
||||
this.metaWorkspace === null || this.metaWorkspace.active;
|
||||
|
||||
const adj = this.layout_manager.stateAdjustment;
|
||||
adj.ease(1, {
|
||||
duration: animate ? Overview.ANIMATION_TIME : 0,
|
||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||
});
|
||||
}
|
||||
|
||||
prepareToLeaveOverview() {
|
||||
for (let i = 0; i < this._windows.length; i++)
|
||||
this._windows[i].remove_all_transitions();
|
||||
@ -1178,18 +1166,6 @@ class Workspace extends St.Widget {
|
||||
this._overviewHiddenId = Main.overview.connect('hidden', this._doneLeavingOverview.bind(this));
|
||||
}
|
||||
|
||||
zoomFromOverview() {
|
||||
this.prepareToLeaveOverview();
|
||||
|
||||
if (this.metaWorkspace !== null && !this.metaWorkspace.active)
|
||||
return;
|
||||
|
||||
this.layout_manager.stateAdjustment.ease(0, {
|
||||
duration: Overview.ANIMATION_TIME,
|
||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||
});
|
||||
}
|
||||
|
||||
_onDestroy() {
|
||||
if (this._overviewHiddenId) {
|
||||
Main.overview.disconnect(this._overviewHiddenId);
|
||||
|
Reference in New Issue
Block a user