Skip to content

Commit

Permalink
added options to set the menubar of the prefs browserwindow or remove…
Browse files Browse the repository at this point in the history
… it entirely to avoid a default menu bar with electron framework 5+
  • Loading branch information
davidsulpy committed Sep 8, 2019
1 parent 4b0962f commit 8159717
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ class ElectronPreferences extends EventEmitter2 {

this.prefsWindow = new BrowserWindow(browserWindowOpts);

if (this.options.menuBar) {
this.prefsWindow.setMenu(this.options.menuBar);
} else {
this.prefsWindow.removeMenu();
}

this.prefsWindow.loadURL(url.format({
'pathname': path.join(__dirname, 'build/index.html'),
'protocol': 'file:',
Expand Down

0 comments on commit 8159717

Please sign in to comment.