Skip to content

Commit

Permalink
Show menu bar by default on Linux and Windows and add option to disab…
Browse files Browse the repository at this point in the history
…le that (#302)
  • Loading branch information
klaudiosinani authored and sindresorhus committed Dec 17, 2017
1 parent 100a437 commit 293aa7e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = new Store({
},
confirmImagePaste: true,
useWorkChat: false,
sidebarHidden: false
sidebarHidden: false,
autoHideMenuBar: false
}
});
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function createMainWindow() {
alwaysOnTop: config.get('alwaysOnTop'),
// Temp workaround for macOS High Sierra, see #295
titleBarStyle: process.platform === 'darwin' && Number(require('os').release().split('.')[0]) >= 17 ? null : 'hidden-inset',
autoHideMenuBar: true,
autoHideMenuBar: config.get('autoHideMenuBar'),
darkTheme: isDarkMode, // GTK+3
webPreferences: {
preload: path.join(__dirname, 'browser.js'),
Expand Down
10 changes: 10 additions & 0 deletions menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,16 @@ const otherTpl = [
config.set('block.typingIndicator', item.checked);
}
},
{
type: 'checkbox',
label: 'Auto Hide Menu Bar',
checked: config.get('autoHideMenuBar'),
click(item, focusedWindow) {
config.set('autoHideMenuBar', item.checked);
focusedWindow.setAutoHideMenuBar(item.checked);
focusedWindow.setMenuBarVisibility(!item.checked);
}
},
{
type: 'separator'
},
Expand Down

0 comments on commit 293aa7e

Please sign in to comment.