mirror of
https://github.com/Vencord/Vesktop.git
synced 2025-02-24 14:15:09 +00:00
fixed crash if a very large tray image was selected
This commit is contained in:
parent
706748f5a5
commit
a85ac17bef
1 changed files with 2 additions and 2 deletions
|
@ -126,7 +126,8 @@ function initTray(win: BrowserWindow) {
|
|||
}
|
||||
}
|
||||
]);
|
||||
tray = new Tray(getTrayIcon());
|
||||
const trayImage = nativeImage.createFromPath(getTrayIcon()).resize({ width: 32, height: 32 });
|
||||
tray = new Tray(trayImage);
|
||||
tray.setToolTip("Vesktop");
|
||||
tray.setContextMenu(trayMenu);
|
||||
tray.on("click", onTrayClick);
|
||||
|
@ -493,7 +494,6 @@ export function getTrayIcon(): string {
|
|||
const trayImage = nativeImage.createFromPath(Settings.store.trayIconPath);
|
||||
if (!trayImage.isEmpty()) return Settings.store.trayIconPath;
|
||||
}
|
||||
|
||||
return ICON_PATH;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue