mirror of
https://github.com/Vencord/Vesktop.git
synced 2025-02-24 14:15:09 +00:00
simplified logic for selecting tray icon on tray init
This commit is contained in:
parent
7dacbb7dda
commit
af04134c37
1 changed files with 2 additions and 5 deletions
|
@ -120,13 +120,10 @@ function initTray(win: BrowserWindow) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
tray = new Tray(ICON_PATH);
|
||||||
if (Settings.store.trayIconPath) {
|
if (Settings.store.trayIconPath) {
|
||||||
const trayImage = nativeImage.createFromPath(Settings.store.trayIconPath);
|
const trayImage = nativeImage.createFromPath(Settings.store.trayIconPath);
|
||||||
if (!trayImage.isEmpty()) tray = new Tray(trayImage.resize({width: 32, height: 32}));
|
if (!trayImage.isEmpty()) tray.setImage(trayImage.resize({width: 32, height: 32}));
|
||||||
else tray = new Tray(ICON_PATH);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
tray = new Tray(ICON_PATH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tray.setToolTip("Vesktop");
|
tray.setToolTip("Vesktop");
|
||||||
|
|
Loading…
Add table
Reference in a new issue