💥 ags(runner/result-widget): only add icon if defined
This commit is contained in:
@@ -31,10 +31,12 @@ class ResultWidget extends Widget.Box {
|
|||||||
this.closeOnClick = props.closeOnClick ?? true;
|
this.closeOnClick = props.closeOnClick ?? true;
|
||||||
this.onClick = () => props.onClick?.();
|
this.onClick = () => props.onClick?.();
|
||||||
|
|
||||||
|
if(this.icon != null) {
|
||||||
this.add(new Widget.Icon({
|
this.add(new Widget.Icon({
|
||||||
visible: Boolean(props.icon),
|
visible: props.icon,
|
||||||
icon: props.icon || "image-missing"
|
icon: props.icon || "image-missing"
|
||||||
} as Widget.IconProps));
|
} as Widget.IconProps));
|
||||||
|
}
|
||||||
|
|
||||||
this.add(new Widget.Box({
|
this.add(new Widget.Box({
|
||||||
orientation: Gtk.Orientation.VERTICAL,
|
orientation: Gtk.Orientation.VERTICAL,
|
||||||
|
|||||||
Reference in New Issue
Block a user