Skip to content
Permalink
Browse files

Fix menubar

  • Loading branch information...
pakastin committed May 28, 2019
1 parent a7cbd69 commit 371400dd3e201b8abe31a15ab9e38a2adb2559cf
Showing with 8 additions and 3 deletions.
  1. +8 −3 app/main.js
@@ -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');

@@ -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', () => {
@@ -30,7 +35,7 @@ mb.on('ready', () => {
});

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

0 comments on commit 371400d

Please sign in to comment.
You can’t perform that action at this time.