asticode / go-astilectron

Build cross platform GUI apps with GO and HTML/JS/CSS (powered by Electron)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MenuItemOptions Icon not sizing properly

packet-sent opened this issue · comments

Hi,
I got the following issue with the sizing of the MenuItemOptions Icon:
image
image

I have tried with different sized icons and different formats (png/ico) and couldn't figure out how to fix it, also tried looking at the documentation (https://pkg.go.dev/github.com/asticode/go-astilectron@v0.27.0#MenuItemOptions) but couldn't see anything pointing me in the right direction, if anybody could help I would appreciate it.

Have you tried using a .png or event better a .svg instead of a .ico ?

So with different sizes of .ico files, it didn't respect the sizes it had (tried many from 8x8 to 128x128) and for the .svg file it gave me the following error (building gave 0 errors) and the menu wasn't present in the tray.
image

However with .png it worked fine with a smaller resolution of 16x16.
image

I think something could be done about this as for the tray icon I just used a .ico file and it worked perfectly to size, as I am pretty sure nobody is intentionally going for something that large in the MenuItem, or maybe we can customize the size.