See #1 Better tray interactivity.

This commit is contained in:
Quentin Decaunes 2019-03-01 17:09:39 +01:00
parent 551b61a644
commit 4c1451ae71

View File

@ -46,7 +46,7 @@ function createWindow () {
mainWindow.hide();
}
});
var contextMenu = Menu.buildFromTemplate([
{
label: 'Show App',
@ -65,6 +65,10 @@ function createWindow () {
tray = new Tray(__dirname + '/assets/icon.ico');
tray.setContextMenu(contextMenu);
tray.setIgnoreDoubleClickEvents(true);
tray.on('click', function() {
mainWindow.show();
});
}
// This method will be called when Electron has finished