fix(tamagotchi): Windows tray icon rendering (#735)

This commit is contained in:
s3d-i
2025-11-12 21:28:52 +08:00
committed by GitHub
parent 51f7f7c7a7
commit 169335179e
+3 -1
View File
@@ -58,7 +58,9 @@ function setupTray(params: {
captionWindow: ReturnType<typeof setupCaptionWindowManager>
}): void {
once(() => {
const appTray = new Tray(nativeImage.createFromPath(macOSTrayIcon).resize({ width: 16 }))
const trayImage = nativeImage.createFromPath(isMacOS ? macOSTrayIcon : icon).resize({ width: 16 })
trayImage.setTemplateImage(isMacOS)
const appTray = new Tray(trayImage)
onAppBeforeQuit(() => appTray.destroy())
const contextMenu = Menu.buildFromTemplate([