Skip to content

Commit

Permalink
replace tweener
Browse files Browse the repository at this point in the history
  • Loading branch information
hslbck committed May 4, 2021
1 parent 482f8f9 commit 828fbe7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions [email protected]/channelCreator.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/*
Copyright (C) 2018 Léo Andrès <[email protected]>
Copyright (C) 2019 hslbck <[email protected]>
Copyright (C) 2019-2021 hslbck <[email protected]>
This file is distributed under the same license as the gnome-shell-extension-radio package.
*/
const St = imports.gi.St;
const GObject = imports.gi.GObject;
const ModalDialog = imports.ui.modalDialog;
const Extension = imports.misc.extensionUtils.getCurrentExtension();
const Tweener = imports.tweener.tweener;

const DIALOG_GROW_TIME = 0.1;

Expand Down Expand Up @@ -50,13 +49,14 @@ var ChannelCreator = GObject.registerClass(
let [errorBoxMinHeight, errorBoxNaturalHeight] = this._errorBox.get_preferred_height(-1);
let parentActor = this._errorBox.get_parent();

Tweener.addTween(parentActor,
{ height: parentActor.height + errorBoxNaturalHeight,
time: DIALOG_GROW_TIME,
transition: 'easeOutQuad',
let height = parentActor.height + errorBoxNaturalHeight;
parentActor.ease({
height,
duration: DIALOG_GROW_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
parentActor.set_height(-1);
this._errorBox.show();
parentActor.set_height(-1);
this._errorBox.show();
}
});
}
Expand Down

0 comments on commit 828fbe7

Please sign in to comment.