git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Commit daf9454b6bd3dc780561f4c2806d2b75f64e1238

add zoom in and zoom out

Matt McKegg committed on 3/13/2017, 1:53:45 AM
Parent: 2017c4f8ecd160fdc386b105ffbb982095e5ea5a

Files changed

index.jschanged
index.jsView
@@ -21,9 +21,20 @@
2121 electron.app.on('ready', () => {
2222 setupContext('ssb', {
2323 server: !(process.argv.includes('-g') || process.argv.includes('--use-global-ssb'))
2424 }, () => {
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))
2637 openMainWindow()
2738 })
2839
2940 electron.app.on('activate', function (e) {

Built with git-ssb-web