MacOS menu not displayed
roromix opened this issue · comments
Romain Harache commented
I have tried to add a menu directly to the app, it display properly on Windows but isn't displayed on MacOS
m := a.NewMenu([]*astilectron.MenuItemOptions{
{
Label: astikit.StrPtr("Menu1"),
OnClick: func(e astilectron.Event) (deleteLister bool) {
window.SendMessage("menu1")
return
},
},
{
Label: astikit.StrPtr("Menu 2"),
OnClick: func(e astilectron.Event) (deleteLister bool) {
window.SendMessage("menu2")
return
},
},
{
Label: astikit.StrPtr("Help"),
SubMenu: []*astilectron.MenuItemOptions{
{
Label: astikit.StrPtr("About"),
OnClick: func(e astilectron.Event) (deleteLister bool) {
createAboutPopin()
return
},
},
},
},
})
err := m.Create()
checkError(err)
Has anyone ever managed to display a menu on MacOS, and how?
Quentin Renard commented
The menu in the demo should be working in MacOS. If you only keep the third item in your menu, does it work in MacOS (I think menus need to have a SubMenu in MacOS)
Romain Harache commented
@asticode : Yes, I have tested, it's now ok. Thanks a lot
And i have created a PR