Commit a71cfb1b1b30fb689555eb98234631ac97182682
Add custom Window menu with Zoom option (#526)
William Meleyal authored on 5/7/2017, 10:22:55 PMMikey committed on 5/7/2017, 10:22:55 PM
Parent: f51f34e305baef50a85422e634e4469dc1459ec5
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -33,8 +33,18 @@ | ||
33 | 33 | { role: 'zoomout' }, |
34 | 34 | { type: 'separator' }, |
35 | 35 | { role: 'togglefullscreen' } |
36 | 36 | ] |
37 | + if (process.platform === 'darwin') { | |
38 | + var win = menu.find(x => x.label === 'Window') | |
39 | + win.submenu = [ | |
40 | + { role: 'minimize' }, | |
41 | + { role: 'zoom' }, | |
42 | + { role: 'close', label: 'Close' }, | |
43 | + { type: 'separator' }, | |
44 | + { role: 'front' } | |
45 | + ] | |
46 | + } | |
37 | 47 | Menu.setApplicationMenu(Menu.buildFromTemplate(menu)) |
38 | 48 | openMainWindow() |
39 | 49 | }) |
40 | 50 |
Built with git-ssb-web