Custom entry dialog icons.

This commit is contained in:
Nuno Cruces 2022-05-05 13:21:00 +01:00
parent 4019a42f15
commit 3a6fb3e70e

View file

@ -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)