From c0c5a999b466570fabfc5ffe27bf8331c1d72aa1 Mon Sep 17 00:00:00 2001 From: FTCHD <144691102+FTCHD@users.noreply.github.com> Date: Sun, 2 Nov 2025 16:04:45 +0100 Subject: [PATCH] macOS tray theme Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com> --- lib/tray.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/tray.ts b/lib/tray.ts index 9de20fc..13aa13f 100644 --- a/lib/tray.ts +++ b/lib/tray.ts @@ -29,7 +29,7 @@ async function resolveTrayIconForTheme() { const existingTheme = usePersistedStore.getState().themeV2 console.log('[resolveTrayIconForTheme] existingTheme', existingTheme) - if ('tray' in existingTheme && existingTheme.tray) { + if (platform() !== 'macos' && 'tray' in existingTheme && existingTheme.tray) { const pickedPath = existingTheme.tray === 'dark' ? 'icons/favicon/icon.png' @@ -40,14 +40,15 @@ async function resolveTrayIconForTheme() { let theme: 'light' | 'dark' = 'dark' - if (platform() === 'windows') { + if (['windows', 'macos'].includes(platform())) { try { const currentWindow = getCurrentWindow() const windowTheme = await currentWindow.theme() + console.log('[resolveTrayIconForTheme] windowTheme', windowTheme) theme = windowTheme === 'dark' ? 'dark' : 'light' } catch {} - } else if (platform() !== 'macos') { + } else { const answer = await ask( 'Based on your tray/menubar, how do you want the icon to look?\n\nIf your menubar has a dark background select light, otherwise select dark.', {