Custom entry dialog icons.
This commit is contained in:
parent
4019a42f15
commit
3a6fb3e70e
1 changed files with 5 additions and 1 deletions
|
@ -12,7 +12,11 @@ func entry(text string, opts options) (string, error) {
|
||||||
data.Options.Answer = &opts.entryText
|
data.Options.Answer = &opts.entryText
|
||||||
data.Options.Hidden = opts.hideText
|
data.Options.Hidden = opts.hideText
|
||||||
data.Options.Timeout = zenutil.Timeout
|
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))
|
data.SetButtons(getButtons(true, true, opts))
|
||||||
|
|
||||||
out, err := zenutil.Run(opts.ctx, "dialog", data)
|
out, err := zenutil.Run(opts.ctx, "dialog", data)
|
||||||
|
|
Loading…
Reference in a new issue