animation: Add dedicated Spinner class
We use AnimatedIcon with the same resource all over the place, cut down on the duplication by providing a dedicated class. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/316
This commit is contained in:

committed by
Florian Müllner

parent
ae48f8bda9
commit
22e21ad7d1
@ -1,6 +1,7 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
|
||||
const GLib = imports.gi.GLib;
|
||||
const Gio = imports.gi.Gio;
|
||||
const Lang = imports.lang;
|
||||
const Mainloop = imports.mainloop;
|
||||
const St = imports.gi.St;
|
||||
@ -86,3 +87,13 @@ var AnimatedIcon = new Lang.Class({
|
||||
this.parent(file, size, size, ANIMATED_ICON_UPDATE_TIMEOUT);
|
||||
}
|
||||
});
|
||||
|
||||
var Spinner = new Lang.Class({
|
||||
Name: 'Spinner',
|
||||
Extends: AnimatedIcon,
|
||||
|
||||
_init(size) {
|
||||
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/process-working.svg');
|
||||
this.parent(file, size);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user