支持系统托盘被左键双击的时候能够显示主窗口

This commit is contained in:
SUPCON\guotao
2023-11-22 10:21:43 +08:00
parent 2f203ed47c
commit 46cc8af99f

View File

@@ -62,6 +62,9 @@ class TrayAddon {
this.tray.setToolTip(cfg.title);
const contextMenu = Menu.buildFromTemplate(trayMenuTemplate);
this.tray.setContextMenu(contextMenu);
this.tray.on('double-click', () => {
mainWindow.show()
})
}
}