Open Madriix opened 1 year ago
I may have found a trick to display only one menu. It's by adding 2 dummy items to the array:
{
label: null
},
{
label: null
}
Like this:
const exampleMenuTemplate = [
{
label: 'Simple O&ptions',
submenu: [
{
label: 'Quit',
click: () => app.quit()
}
]
},
{
label: null
},
{
label: null
}
]
https://github.com/AlexTorresDev/custom-electron-titlebar/blob/main/example/main.js#L62 By entering only one item (only Simple O&ptions and removing the others), it does not display the menu, but when I enter 3 or 4 items, it displays a menu. How can I make it display with just one menu?
Example: