Skip to content
This repository was archived by the owner on Sep 13, 2024. It is now read-only.

Problem that two menus are not displayed. #229

Open
naive924 opened this issue Jul 17, 2023 · 2 comments
Open

Problem that two menus are not displayed. #229

naive924 opened this issue Jul 17, 2023 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@naive924
Copy link

Describe the bug
The menu is not displayed unless three or more are defined(not displayed if one or two).

To Reproduce

  1. Edit exampleMenuTemplate in example/main.js and make it two
  2. Run example/main.js with npm start

Screenshots
image
image

@AlexTorresDev AlexTorresDev added the duplicate This issue or pull request already exists label Jul 17, 2023
@AlexTorresDev
Copy link
Owner

Duplicate #216

@Madriix
Copy link

Madriix commented Apr 13, 2024

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
}
]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants