0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2024-12-24 14:34:39 +03:00

fix tray icon

This commit is contained in:
Andrey Onishchenko 2024-02-10 19:14:52 +03:00
parent 9b67fe0c60
commit 3eb7fe7816

View File

@ -2,11 +2,13 @@ diff --git a/main/lib/createTray.js b/main/lib/createTray.js
index e69de29..c8b9f0d 100644 index e69de29..c8b9f0d 100644
--- a/main/lib/createTray.js --- a/main/lib/createTray.js
+++ b/main/lib/createTray.js +++ b/main/lib/createTray.js
@@ -0,0 +1,17 @@ @@ -0,0 +1,19 @@
+const { app, Menu, Tray } = require('electron') +const { app, Menu, Tray, nativeImage } = require('electron');
+const path = require('path');
+ +
+function createTray(window) { +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([ + const contextMenu = Menu.buildFromTemplate([
+ {label: 'Quit YandexMusic', click: app.quit} + {label: 'Quit YandexMusic', click: app.quit}
+ ]); + ]);