mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-23 02:23:31 +07:00
See #1 Fixed tray icon disappearing.
This commit is contained in:
parent
56a3c4ff62
commit
551b61a644
5
main.js
5
main.js
@ -11,6 +11,7 @@ const {app, BrowserWindow, Menu, Tray} = require('electron')
|
|||||||
// Keep a global reference of the window object, if you don't, the window will
|
// Keep a global reference of the window object, if you don't, the window will
|
||||||
// be closed automatically when the JavaScript object is garbage collected.
|
// be closed automatically when the JavaScript object is garbage collected.
|
||||||
let mainWindow
|
let mainWindow
|
||||||
|
let tray
|
||||||
|
|
||||||
function createWindow () {
|
function createWindow () {
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
@ -62,8 +63,8 @@ function createWindow () {
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
var appIcon = new Tray(__dirname + '/assets/icon.ico');
|
tray = new Tray(__dirname + '/assets/icon.ico');
|
||||||
appIcon.setContextMenu(contextMenu);
|
tray.setContextMenu(contextMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method will be called when Electron has finished
|
// This method will be called when Electron has finished
|
||||||
|
Loading…
Reference in New Issue
Block a user