fix panel icon inheritance

Bug report https://bugzilla.gnome.org/show_bug.cgi\?id\=688973
This commit is contained in:
Wolfgang Rumpler 2018-11-01 20:03:30 +01:00
parent 21496bb788
commit b89d670eb3
2 changed files with 10 additions and 10 deletions

View file

@ -230,11 +230,11 @@ var NewWallpaperElement = new Lang.Class({
var StatusElement = new Lang.Class({
Name: 'StatusElement',
Extends: St.Icon,
icon: null,
_init: function () {
this.parent({
this.icon = new St.Icon({
icon_name: 'preferences-desktop-wallpaper-symbolic',
style_class: 'system-status-icon'
});
@ -243,11 +243,11 @@ var StatusElement = new Lang.Class({
this.loadingTweenIn = {
opacity: 20,
time: 1,
time: 2,
transition: 'easeInOutSine',
onComplete: function () {
try {
Tweener.addTween(_this, _this.loadingTweenOut);
Tweener.addTween(_this.icon, _this.loadingTweenOut);
} catch (e) {
// swollow (not really important)
}
@ -261,7 +261,7 @@ var StatusElement = new Lang.Class({
onComplete: function () {
if (_this.isLoading) {
try {
Tweener.addTween(_this, _this.loadingTweenIn);
Tweener.addTween(_this.icon, _this.loadingTweenIn);
} catch (e) {
// swollow (not really important)
}
@ -276,13 +276,13 @@ var StatusElement = new Lang.Class({
startLoading: function () {
this.isLoading = true;
Tweener.addTween(this, this.loadingTweenOut);
Tweener.addTween(this.icon, this.loadingTweenOut);
},
stopLoading: function () {
this.isLoading = false;
Tweener.removeTweens(this);
this.opacity = 255;
Tweener.removeTweens(this.icon);
this.icon.opacity = 255;
}
});

View file

@ -84,7 +84,7 @@ var RandomWallpaperEntry = new Lang.Class({
// Panelmenu Icon
this.statusIcon = new CustomElements.StatusElement();
this.actor.add_child(this.statusIcon);
this.actor.add_child(this.statusIcon.icon);
// new wallpaper button
this.newWallpaperItem = new CustomElements.NewWallpaperElement();