Skip to content

Commit

Permalink
Fix menubar
Browse files Browse the repository at this point in the history
  • Loading branch information
pakastin committed May 28, 2019
1 parent a7cbd69 commit 371400d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { app, ipcMain } = require('electron');
const path = require('path');
const menubar = require('menubar');
const { menubar } = require('@amaurymartiny/menubar');
const { autoUpdater } = require('electron-updater');
const { systemPreferences } = require('electron');

Expand All @@ -11,7 +11,12 @@ let currentIcon = lightIcon;
const mb = menubar({
icon: path.join(__dirname, 'Icon.png'),
preloadWindow: true,
resizable: false
resizable: false,
browserWindow: {
webPreferences: {
nodeIntegration: true
}
}
});

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

mb.on('hide', () => {
mb.window.reload();
mb.browserWindow.reload();
mb.tray.setImage(currentIcon);
});

Expand Down

0 comments on commit 371400d

Please sign in to comment.