js: Actorize animated objects

We have a couple of places where we don't tween the actor, but a
custom property on the delegate object. In order to move those
to Clutter animations, we will need an animatable, so turn those
objects into widget subclasses.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/666
This commit is contained in:
Florian Müllner
2019-07-25 18:53:00 +02:00
parent 928595fe21
commit 3d3dca4aa2
7 changed files with 142 additions and 125 deletions

View File

@ -66,8 +66,11 @@ var OsdWindow = class {
this._label = new St.Label();
this._box.add(this._label);
this._level = new BarLevel.BarLevel(0, { styleClass: 'level' });
this._box.add(this._level.actor);
this._level = new BarLevel.BarLevel({
style_class: 'level',
value: 0
});
this._box.add(this._level);
this._hideTimeoutId = 0;
this._reset();
@ -107,7 +110,7 @@ var OsdWindow = class {
}
setLevel(value) {
this._level.actor.visible = (value != undefined);
this._level.visible = (value != undefined);
if (value != undefined) {
if (this.actor.visible)
Tweener.addTween(this._level,