mirror of
https://github.com/Vencord/Vesktop.git
synced 2025-02-24 14:15:09 +00:00
fixed macos tray display bugs
This commit is contained in:
parent
f525e541d6
commit
37c3259171
1 changed files with 9 additions and 5 deletions
|
@ -121,10 +121,14 @@ function initTray(win: BrowserWindow) {
|
|||
}
|
||||
}
|
||||
]);
|
||||
tray = new Tray(ICON_PATH);
|
||||
if (Settings.store.trayIconPath) {
|
||||
const trayImage = nativeImage.createFromPath(Settings.store.trayIconPath);
|
||||
if (!trayImage.isEmpty()) tray.setImage(trayImage.resize({ width: 32, height: 32 }));
|
||||
var trayImage = nativeImage.createFromPath(ICON_PATH);
|
||||
if (Settings.store.trayIconPath) trayImage = nativeImage.createFromPath(Settings.store.trayIconPath);
|
||||
if (trayImage.isEmpty()) trayImage = nativeImage.createFromPath(ICON_PATH);
|
||||
|
||||
if (process.platform === "darwin") {
|
||||
tray = new Tray(trayImage.resize({ width: 16, height: 16 }));
|
||||
} else {
|
||||
tray = new Tray(trayImage.resize({ width: 32, height: 32 }));
|
||||
}
|
||||
|
||||
tray.setToolTip("Vesktop");
|
||||
|
@ -433,7 +437,7 @@ function createMainWindow() {
|
|||
if (Settings.store.staticTitle) win.on("page-title-updated", e => e.preventDefault());
|
||||
|
||||
initWindowBoundsListeners(win);
|
||||
if (!isDeckGameMode && (Settings.store.tray ?? true) && process.platform !== "darwin") initTray(win);
|
||||
if (!isDeckGameMode && (Settings.store.tray ?? true)) initTray(win);
|
||||
initMenuBar(win);
|
||||
makeLinksOpenExternally(win);
|
||||
initSettingsListeners(win);
|
||||
|
|
Loading…
Add table
Reference in a new issue