Update tray icon for macos
This commit is contained in:
parent
96eb5541e9
commit
e3088133f3
|
|
@ -104,6 +104,12 @@ app.whenReady().then(() => {
|
|||
tray.setIgnoreDoubleClickEvents(true)
|
||||
|
||||
const contextMenu = Menu.buildFromTemplate([
|
||||
...(process.platform === 'darwin' ? [{
|
||||
label: 'Show',
|
||||
click: _ => {
|
||||
mainWindow.show()
|
||||
}
|
||||
}] : []),
|
||||
{
|
||||
label: 'Hide',
|
||||
click: _ => {
|
||||
|
|
@ -118,14 +124,16 @@ app.whenReady().then(() => {
|
|||
}
|
||||
},
|
||||
])
|
||||
tray.setToolTip('Umbra')
|
||||
tray.setToolTip(app.getName())
|
||||
tray.setContextMenu(contextMenu)
|
||||
|
||||
// Prevent menu from being shown on left click
|
||||
// Instead make main window visible (if it had been invisible)
|
||||
if (process.platform !== 'darwin') {
|
||||
tray.on('click', _ => {
|
||||
mainWindow.show()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
ipcMain.handle('game:insert', async (_, game: Game) => {
|
||||
|
|
|
|||
Reference in a new issue