Skip to content

Commit

Permalink
use hide window buttons on macos only (#316)
Browse files Browse the repository at this point in the history
* use hide window buttons on macos only

* clean up macos window items
  • Loading branch information
DinCahill authored Feb 21, 2022
1 parent 95e7f3b commit 4ffb23b
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions src/main/menus/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,24 @@ interface AppearanceMenuItem {
}

export function getAppMenu() {
const macOSWindowItems: MenuItemConstructorOptions[] = [
{
label: `Hide ${app.name}`,
role: 'hide'
},
{
label: 'Hide Others',
role: 'hideOthers'
},
{
label: 'Show All',
role: 'unhide'
},
{
type: 'separator'
}
]

const appearanceMenuItems: AppearanceMenuItem[] = [
{
key: ConfigKey.CompactHeader,
Expand Down Expand Up @@ -470,23 +488,7 @@ export function getAppMenu() {
{
type: 'separator'
},
{
label: `Hide ${app.name}`,
accelerator: 'CommandOrControl+H',
role: 'hide'
},
{
label: 'Hide Others',
accelerator: 'CommandOrControl+Shift+H',
role: 'hideOthers'
},
{
label: 'Show All',
role: 'unhide'
},
{
type: 'separator'
},
...(is.macos ? macOSWindowItems : []),
{
label: `Quit ${app.name}`,
accelerator: 'CommandOrControl+Q',
Expand Down

0 comments on commit 4ffb23b

Please sign in to comment.