From 3a6fb3e70e3fdf400e42b28ac942c419ad6e8d57 Mon Sep 17 00:00:00 2001 From: Nuno Cruces Date: Thu, 5 May 2022 13:21:00 +0100 Subject: [PATCH] Custom entry dialog icons. --- entry_darwin.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/entry_darwin.go b/entry_darwin.go index 039a296..686cea1 100644 --- a/entry_darwin.go +++ b/entry_darwin.go @@ -12,7 +12,11 @@ func entry(text string, opts options) (string, error) { data.Options.Answer = &opts.entryText data.Options.Hidden = opts.hideText data.Options.Timeout = zenutil.Timeout - data.Options.Icon = opts.icon.String() + if opts.customIcon != "" { + data.IconPath = opts.customIcon + } else { + data.Options.Icon = opts.icon.String() + } data.SetButtons(getButtons(true, true, opts)) out, err := zenutil.Run(opts.ctx, "dialog", data)