Merge pull request #1550 from h3poteto/fix/mac-menu
Remove menu bar menu when platform is darwin
This commit is contained in:
commit
9aca3100fa
|
@ -1241,6 +1241,23 @@ const ApplicationMenu = (accountsChange: Array<MenuItemConstructorOptions>, menu
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const macWindowMenu: Array<MenuItemConstructorOptions> =
|
||||||
|
process.platform === 'darwin'
|
||||||
|
? []
|
||||||
|
: [
|
||||||
|
{
|
||||||
|
label: i18n.t('main_menu.window.always_show_menu_bar'),
|
||||||
|
type: 'checkbox',
|
||||||
|
checked: !menu.autoHideMenu,
|
||||||
|
click: item => {
|
||||||
|
changeMenuAutoHide(!item.checked)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'separator'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
const template: Array<MenuItemConstructorOptions> = [
|
const template: Array<MenuItemConstructorOptions> = [
|
||||||
{
|
{
|
||||||
label: i18n.t('main_menu.application.name'),
|
label: i18n.t('main_menu.application.name'),
|
||||||
|
@ -1345,17 +1362,7 @@ const ApplicationMenu = (accountsChange: Array<MenuItemConstructorOptions>, menu
|
||||||
{
|
{
|
||||||
label: i18n.t('main_menu.window.name'),
|
label: i18n.t('main_menu.window.name'),
|
||||||
submenu: [
|
submenu: [
|
||||||
{
|
...macWindowMenu,
|
||||||
label: i18n.t('main_menu.window.always_show_menu_bar'),
|
|
||||||
type: 'checkbox',
|
|
||||||
checked: !menu.autoHideMenu,
|
|
||||||
click: item => {
|
|
||||||
changeMenuAutoHide(!item.checked)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'separator'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: i18n.t('main_menu.window.close'),
|
label: i18n.t('main_menu.window.close'),
|
||||||
role: 'close'
|
role: 'close'
|
||||||
|
|
Loading…
Reference in New Issue