messageTray: Fix custom notification icons
NotificationMessages set the icon either from the corresponding notification's gicon property, or fall back to the source icon. Except that we never actually set a notification's gicon property to the provided icon, so we currently just always fall back, whoops!
This commit is contained in:
parent
8aa1765f24
commit
3614da6845
@ -571,8 +571,10 @@ const Notification = new Lang.Class({
|
||||
|
||||
let oldFocus = global.stage.key_focus;
|
||||
|
||||
if (this._icon && (params.gicon || params.clear)) {
|
||||
this._icon.destroy();
|
||||
if (params.gicon || params.clear) {
|
||||
this.gicon = params.gicon;
|
||||
if (this._icon)
|
||||
this._icon.destroy();
|
||||
this._icon = null;
|
||||
}
|
||||
|
||||
@ -604,8 +606,8 @@ const Notification = new Lang.Class({
|
||||
if (!this._scrollArea && !this._actionArea)
|
||||
this._table.remove_style_class_name('multi-line-notification');
|
||||
|
||||
if (params.gicon) {
|
||||
this._icon = new St.Icon({ gicon: params.gicon,
|
||||
if (this.gicon) {
|
||||
this._icon = new St.Icon({ gicon: this.gicon,
|
||||
icon_size: this.ICON_SIZE });
|
||||
} else {
|
||||
this._icon = this.source.createIcon(this.ICON_SIZE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user