fix "Error meta is null on Gnome 3.38"

This commit is contained in:
Michael Ott
2020-10-08 20:22:49 +02:00
parent 6b8d1693dd
commit 3029f4f7b8

View File

@@ -1,6 +1,7 @@
const GObject = imports.gi.GObject;
const PopupMenu = imports.ui.popupMenu;
const St = imports.gi.St;
const Clutter = imports.gi.Clutter;
var FreonItem = GObject.registerClass(class FreonItem extends PopupMenu.PopupBaseMenuItem {
@@ -10,9 +11,9 @@ var FreonItem = GObject.registerClass(class FreonItem extends PopupMenu.PopupBas
this._key = key;
this._gIcon = gIcon;
this._labelActor = new St.Label({text: displayName ? displayName : label});
this._labelActor = new St.Label({text: displayName ? displayName : label, x_align: Clutter.ActorAlign.CENTER, x_expand: true});
this.actor.add(new St.Icon({ style_class: 'popup-menu-icon', gicon : gIcon}));
this.actor.add(this._labelActor, {x_fill: true, expand: true});
this.actor.add_child(this._labelActor);
this._valueLabel = new St.Label({text: value});
this.actor.add(this._valueLabel);
}