From 5eecab59431cb4966eaa1fc907a8e5c16c813230 Mon Sep 17 00:00:00 2001 From: l Date: Fri, 10 Oct 2025 19:24:53 +0300 Subject: [PATCH 1/2] fix(macos): tray icon size --- src/native/tray.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/native/tray.ts b/src/native/tray.ts index 54d2573..2ed64a5 100644 --- a/src/native/tray.ts +++ b/src/native/tray.ts @@ -8,12 +8,23 @@ import { mainWindow, quitApp } from "./window"; // internal tray state let tray: Tray = null; -// load the tray icon -const trayIcon = nativeImage.createFromDataURL(trayIconAsset); +// Create and resize tray icon for macOS +function createTrayIcon() { + const image = nativeImage.createFromDataURL(trayIconAsset); + + // Resize to a sane size for macOS (about 20px) + const resized = image.resize({ width: 20, height: 20 }); + + // Mark as template image so it adapts to dark/light mode + resized.setTemplateImage(true); + + return resized; +} // trayIcon.setTemplateImage(true); export function initTray() { + const trayIcon = createTrayIcon(); tray = new Tray(trayIcon); updateTrayMenu(); tray.setToolTip("Stoat for Desktop"); From 61ffe199eef53b8fe0800b4d3f61626196f674f2 Mon Sep 17 00:00:00 2001 From: l Date: Fri, 10 Oct 2025 19:29:43 +0300 Subject: [PATCH 2/2] chore(macos): remove useless comment --- src/native/tray.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/native/tray.ts b/src/native/tray.ts index 2ed64a5..6f96a4e 100644 --- a/src/native/tray.ts +++ b/src/native/tray.ts @@ -11,8 +11,6 @@ let tray: Tray = null; // Create and resize tray icon for macOS function createTrayIcon() { const image = nativeImage.createFromDataURL(trayIconAsset); - - // Resize to a sane size for macOS (about 20px) const resized = image.resize({ width: 20, height: 20 }); // Mark as template image so it adapts to dark/light mode