Commit daf9454b6bd3dc780561f4c2806d2b75f64e1238
add zoom in and zoom out
Matt McKegg committed on 3/13/2017, 1:53:45 AMParent: 2017c4f8ecd160fdc386b105ffbb982095e5ea5a
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -21,9 +21,20 @@ | ||
21 | 21 | electron.app.on('ready', () => { |
22 | 22 | setupContext('ssb', { |
23 | 23 | server: !(process.argv.includes('-g') || process.argv.includes('--use-global-ssb')) |
24 | 24 | }, () => { |
25 | - Menu.setApplicationMenu(Menu.buildFromTemplate(defaultMenu(electron.app, electron.shell))) | |
25 | + var menu = defaultMenu(electron.app, electron.shell) | |
26 | + var view = menu.find(x => x.label === 'View') | |
27 | + view.submenu.push({ | |
28 | + label: 'Zoom In', | |
29 | + accelerator: 'CmdOrCtrl+=', | |
30 | + role: 'zoomin' | |
31 | + }, { | |
32 | + label: 'Zoom Out', | |
33 | + accelerator: 'CmdOrCtrl+-', | |
34 | + role: 'zoomout' | |
35 | + }) | |
36 | + Menu.setApplicationMenu(Menu.buildFromTemplate(menu)) | |
26 | 37 | openMainWindow() |
27 | 38 | }) |
28 | 39 | |
29 | 40 | electron.app.on('activate', function (e) { |
Built with git-ssb-web