File tree 3 files changed +17
-0
lines changed
3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ const { setApplicationMenu } = require("./menu");
9
9
const {
10
10
autoUpdate,
11
11
getEnabledPlugins,
12
+ hideMenu,
12
13
isAppVisible,
13
14
isTrayEnabled,
14
15
store,
@@ -85,6 +86,7 @@ function createMainWindow() {
85
86
} ,
86
87
frame : ! is . macOS ( ) ,
87
88
titleBarStyle : is . macOS ( ) ? "hiddenInset" : "default" ,
89
+ autoHideMenuBar : hideMenu ( ) ,
88
90
} ) ;
89
91
if ( windowMaximized ) {
90
92
win . maximize ( ) ;
Original file line number Diff line number Diff line change 7
7
enablePlugin,
8
8
disablePlugin,
9
9
autoUpdate,
10
+ hideMenu,
10
11
isAppVisible,
11
12
isTrayEnabled,
12
13
setOptions,
@@ -42,6 +43,18 @@ const mainMenuTemplate = (win) => [
42
43
setOptions ( { autoUpdates : item . checked } ) ;
43
44
} ,
44
45
} ,
46
+ ...( is . windows ( ) || is . linux ( )
47
+ ? [
48
+ {
49
+ label : "Hide menu" ,
50
+ type : "checkbox" ,
51
+ checked : hideMenu ( ) ,
52
+ click : ( item ) => {
53
+ setOptions ( { hideMenu : item . checked } ) ;
54
+ } ,
55
+ } ,
56
+ ]
57
+ : [ ] ) ,
45
58
...( is . windows ( ) || is . macOS ( )
46
59
? // Only works on Win/Mac
47
60
// https://www.electronjs.org/docs/api/app#appsetloginitemsettingssettings-macos-windows
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const store = new Store({
13
13
tray : false ,
14
14
appVisible : true ,
15
15
autoUpdates : true ,
16
+ hideMenu : false ,
16
17
startAtLogin : false ,
17
18
} ,
18
19
} ,
@@ -31,5 +32,6 @@ module.exports = {
31
32
isTrayEnabled : ( ) => store . get ( "options.tray" ) ,
32
33
isAppVisible : ( ) => store . get ( "options.appVisible" ) ,
33
34
autoUpdate : ( ) => store . get ( "options.autoUpdates" ) ,
35
+ hideMenu : ( ) => store . get ( "options.hideMenu" ) ,
34
36
startAtLogin : ( ) => store . get ( "options.startAtLogin" ) ,
35
37
} ;
You can’t perform that action at this time.
0 commit comments