overview: Synchronize panel opacity with overview leave animation

Gestures leaving the overview from a short distance result in an
ugly effect with the panel opacity transitionhaving a fixed duration.
Make this transition have the same duration (although in a hackish
way) so we avoid the ugly effect.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1643>
This commit is contained in:
Carlos Garnacho 2021-02-17 00:57:13 +01:00
parent f7f46ca9ac
commit 76836fe388

View File

@ -397,6 +397,7 @@ var Overview = class {
if (endProgress === 0) {
this._shown = false;
this.emit('hiding');
Main.panel.style = 'transition-duration: %dms;'.format(duration);
onComplete = () => this._hideDone();
} else {
onComplete = () => this._showDone();
@ -626,6 +627,8 @@ var Overview = class {
else
Main.layoutManager.hideOverview();
Main.panel.style = null;
this._syncGrab();
}