Added system tray service

This commit is contained in:
2025-06-08 23:07:56 +08:00
parent d5a0b07f2a
commit 8522a47b5f
12 changed files with 136 additions and 646 deletions

View File

@@ -84,13 +84,20 @@ func main() {
Backdrop: application.MacBackdropTranslucent,
TitleBar: application.MacTitleBarHiddenInset,
},
Windows: application.WindowsWindow{
Theme: application.SystemDefault,
},
BackgroundColour: application.NewRGB(27, 38, 54),
URL: "/#/",
})
mainWindow.Center()
// 创建托盘服务
trayService := services.NewTrayService(serviceManager.GetLogger(), serviceManager.GetConfigService())
trayService.SetAppReferences(app, mainWindow)
// 设置系统托盘
systray.SetupSystemTray(app, mainWindow, assets)
systray.SetupSystemTray(app, mainWindow, assets, trayService)
// 初始化热键服务
hotkeyService := serviceManager.GetHotkeyService()