Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/main/mainWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import { createSplashWindow, updateSplashMessage } from "./splash";
import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally";
import { applyDeckKeyboardFix, askToApplySteamLayout, isDeckGameMode } from "./utils/steamOS";
import { downloadVencordFiles, ensureVencordFiles } from "./utils/vencordLoader";
import { nativeImage } from "electron/common";

let isQuitting = false;
let tray: Tray;
Expand Down Expand Up @@ -126,7 +127,14 @@ function initTray(win: BrowserWindow) {
}
]);

tray = new Tray(ICON_PATH);
if (process.platform === "darwin") {
const icon = nativeImage.createFromPath(ICON_PATH)
.resize({ width: 16 });
tray = new Tray(icon);
} else {
tray = new Tray(ICON_PATH);
}

tray.setToolTip("Vesktop");
tray.setContextMenu(trayMenu);
tray.on("click", onTrayClick);
Expand Down Expand Up @@ -477,7 +485,7 @@ function createMainWindow() {
});

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);
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/components/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ const SettingsOptions: Record<string, Array<BooleanSetting | SettingsComponent>>
key: "tray",
title: "Tray Icon",
description: "Add a tray icon for Vesktop",
defaultValue: true,
invisible: () => isMac
defaultValue: !isMac
},
{
key: "minimizeToTray",
Expand Down