js: Use Clutter transitions for adjustment changes

This concludes our quest of moving from Tweener to Clutter's
animation framework.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669
This commit is contained in:
Florian Müllner
2019-07-24 21:03:17 +02:00
parent 8ac2086ed1
commit b67c300484
5 changed files with 35 additions and 44 deletions

View File

@ -5,7 +5,6 @@ const { Clutter, Gio, GObject, Meta, Shell, St } = imports.gi;
const Signals = imports.signals;
const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
const WindowManager = imports.ui.windowManager;
const Workspace = imports.ui.workspace;
@ -245,13 +244,10 @@ var WorkspacesView = class extends WorkspacesViewBase {
this._animatingScroll = true;
Tweener.addTween(this.scrollAdjustment, {
value: index,
time: WORKSPACE_SWITCH_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this._animatingScroll = false;
}
this.scrollAdjustment.ease(index, {
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: WORKSPACE_SWITCH_TIME,
onComplete: () => this._animatingScroll = false
});
}