mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-22 18:13:28 +07:00
See #1 Better tray interactivity.
This commit is contained in:
parent
551b61a644
commit
4c1451ae71
6
main.js
6
main.js
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user