feat: enable auto color for MacOS

This commit is contained in:
Thorge Dammann
2025-02-10 12:12:27 +01:00
committed by Gregor Vostrak
parent c3fd77a735
commit bd03e56966
3 changed files with 3 additions and 2 deletions

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 765 B

After

Width:  |  Height:  |  Size: 765 B

+3 -2
View File
@@ -1,6 +1,6 @@
import { app, BrowserWindow, ipcMain, Menu, nativeImage, Tray } from 'electron'
import activeTrayIcon from '../../resources/solidtime_tray@4x.png?asset'
import inactiveTrayIcon from '../../resources/solidtime_empty@4x.png?asset'
import activeTrayIcon from '../../resources/solidtime_trayTemplate@4x.png?asset'
import inactiveTrayIcon from '../../resources/solidtime_emptyTemplate@4x.png?asset'
import { TimeEntry } from '@solidtime/api'
function buildMenu(mainWindow: BrowserWindow, timeEntry: TimeEntry | null) {
@@ -49,6 +49,7 @@ export function initializeTray(mainWindow: Electron.BrowserWindow) {
const tray = new Tray(nativeImage.createFromPath(inactiveTrayIcon))
tray.setToolTip('solidtime')
tray.setContextMenu(buildMenu(mainWindow, null))
return tray
}