animation: Turn Spinner animate parameter into Params option
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/832
This commit is contained in:
@ -3,6 +3,8 @@
|
||||
|
||||
const { Clutter, GLib, GObject, Gio, St } = imports.gi;
|
||||
|
||||
const Params = imports.misc.params;
|
||||
|
||||
var ANIMATED_ICON_UPDATE_TIMEOUT = 16;
|
||||
var SPINNER_ANIMATION_TIME = 300;
|
||||
var SPINNER_ANIMATION_DELAY = 1000;
|
||||
@ -136,12 +138,15 @@ class AnimatedIcon extends Animation {
|
||||
|
||||
var Spinner = GObject.registerClass(
|
||||
class Spinner extends AnimatedIcon {
|
||||
_init(size, animate = false) {
|
||||
_init(size, params) {
|
||||
params = Params.parse(params, {
|
||||
animate: false,
|
||||
});
|
||||
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/process-working.svg');
|
||||
super._init(file, size);
|
||||
|
||||
this.opacity = 0;
|
||||
this._animate = animate;
|
||||
this._animate = params.animate;
|
||||
}
|
||||
|
||||
_onDestroy() {
|
||||
|
Reference in New Issue
Block a user