File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 BrowserWindow
55} = require ( 'electron' ) ;
66const shorcuts = require ( './shortcuts' ) ;
7+ const menu = require ( './menu' ) ;
78
89const HOME = 'https://www.figma.com/'
910const winOptions = {
@@ -34,6 +35,7 @@ app.on('ready', () => {
3435 } )
3536
3637 shorcuts ( window ) ;
38+ menu ( window ) ;
3739
3840 window . on ( 'closed' , ( ) => {
3941 window = null ;
Original file line number Diff line number Diff line change 1+ const { Menu, MenuItem } = require ( 'electron' ) ;
2+
3+ const menu = new Menu ( ) ;
4+
5+ module . exports = ( window ) => {
6+ menu . append ( new MenuItem ( {
7+ label : 'Window' ,
8+ accelerator : 'F5' ,
9+ click : ( ) => {
10+ window . reload ( ) ;
11+ }
12+ } ) ) ;
13+
14+ Menu . setApplicationMenu ( menu ) ;
15+ }
Original file line number Diff line number Diff line change 11const { globalShortcut } = require ( 'electron' ) ;
22
3- module . exports = function ( window ) {
3+ module . exports = ( window ) => {
44 let zoom = 0.7 ;
55
66 globalShortcut . register ( 'CommandOrControl+-' , ( ) => {
@@ -19,7 +19,4 @@ module.exports = function(window) {
1919 zoom += 0.05 ;
2020 window . webContents . setZoomFactor ( zoom ) ;
2121 } ) ;
22- globalShortcut . register ( 'F5' , ( ) => {
23- window . reload ( ) ;
24- } ) ;
2522}
You can’t perform that action at this time.
0 commit comments