Skip to content

Commit 371400d

Browse files
committed
Fix menubar
1 parent a7cbd69 commit 371400d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

app/main.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { app, ipcMain } = require('electron');
22
const path = require('path');
3-
const menubar = require('menubar');
3+
const { menubar } = require('@amaurymartiny/menubar');
44
const { autoUpdater } = require('electron-updater');
55
const { systemPreferences } = require('electron');
66

@@ -11,7 +11,12 @@ let currentIcon = lightIcon;
1111
const mb = menubar({
1212
icon: path.join(__dirname, 'Icon.png'),
1313
preloadWindow: true,
14-
resizable: false
14+
resizable: false,
15+
browserWindow: {
16+
webPreferences: {
17+
nodeIntegration: true
18+
}
19+
}
1520
});
1621

1722
mb.app.on('window-all-closed', () => {
@@ -30,7 +35,7 @@ mb.on('ready', () => {
3035
});
3136

3237
mb.on('hide', () => {
33-
mb.window.reload();
38+
mb.browserWindow.reload();
3439
mb.tray.setImage(currentIcon);
3540
});
3641

0 commit comments

Comments
 (0)