From 3eb7fe7816733cf8a62d139d55e57cfe659fbc7a Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Sat, 10 Feb 2024 19:14:52 +0300 Subject: [PATCH] fix tray icon --- patches/0003-Create-app-tray-icon.patch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/patches/0003-Create-app-tray-icon.patch b/patches/0003-Create-app-tray-icon.patch index c385a70..4259703 100644 --- a/patches/0003-Create-app-tray-icon.patch +++ b/patches/0003-Create-app-tray-icon.patch @@ -2,11 +2,13 @@ diff --git a/main/lib/createTray.js b/main/lib/createTray.js index e69de29..c8b9f0d 100644 --- a/main/lib/createTray.js +++ b/main/lib/createTray.js -@@ -0,0 +1,17 @@ -+const { app, Menu, Tray } = require('electron') +@@ -0,0 +1,19 @@ ++const { app, Menu, Tray, nativeImage } = require('electron'); ++const path = require('path'); + +function createTray(window) { -+ const tray = new Tray('build/next-desktop/favicon.png'); ++ const iconPath = path.join(__dirname, '../../build/next-desktop/favicon.png'); ++ const tray = new Tray(iconPath); + const contextMenu = Menu.buildFromTemplate([ + {label: 'Quit YandexMusic', click: app.quit} + ]);