From dc6fb579b7b663d1abdb56ec70ba4108ce60ab1c Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Mon, 15 Jun 2020 23:16:12 +0900 Subject: [PATCH] Remove menu bar menu when platform is darwin --- src/main/index.ts | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index abbeee88..bd413b92 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1241,6 +1241,23 @@ const ApplicationMenu = (accountsChange: Array, menu } ] + const macWindowMenu: Array = + 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 = [ { label: i18n.t('main_menu.application.name'), @@ -1345,17 +1362,7 @@ const ApplicationMenu = (accountsChange: Array, menu { label: i18n.t('main_menu.window.name'), submenu: [ - { - label: i18n.t('main_menu.window.always_show_menu_bar'), - type: 'checkbox', - checked: !menu.autoHideMenu, - click: item => { - changeMenuAutoHide(!item.checked) - } - }, - { - type: 'separator' - }, + ...macWindowMenu, { label: i18n.t('main_menu.window.close'), role: 'close'