Merge pull request #418 from Orchardxyz/fix/icon-size

fix: adjust icon size for macOS platform compatibility
This commit is contained in:
Sid
2026-04-11 11:41:58 -07:00
committed by GitHub
2 changed files with 7 additions and 5 deletions
+7 -5
View File
@@ -62,10 +62,12 @@ let mainWindow: BrowserWindow | null = null;
let sourceSelectorWindow: BrowserWindow | null = null;
let tray: Tray | null = null;
let selectedSourceName = "";
const isMac = process.platform === "darwin";
const trayIconSize = isMac ? 16 : 24;
// Tray Icons
const defaultTrayIcon = getTrayIcon("openscreen.png");
const recordingTrayIcon = getTrayIcon("rec-button.png");
const defaultTrayIcon = getTrayIcon("openscreen.png", trayIconSize);
const recordingTrayIcon = getTrayIcon("rec-button.png", trayIconSize);
function createWindow() {
mainWindow = createHudOverlayWindow();
@@ -199,12 +201,12 @@ function createTray() {
});
}
function getTrayIcon(filename: string) {
function getTrayIcon(filename: string, size: number) {
return nativeImage
.createFromPath(path.join(process.env.VITE_PUBLIC || RENDERER_DIST, filename))
.resize({
width: 24,
height: 24,
width: size,
height: size,
quality: "best",
});
}
Binary file not shown.