mirror of
https://github.com/solidtime-io/solidtime-desktop.git
synced 2026-05-07 20:32:27 +00:00
feat: enable auto color for MacOS
This commit is contained in:
committed by
Gregor Vostrak
parent
c3fd77a735
commit
bd03e56966
|
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
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user