✨ Added settings window
This commit is contained in:
19
main.go
19
main.go
@@ -60,9 +60,26 @@ func main() {
|
||||
BackgroundColour: application.NewRGB(27, 38, 54),
|
||||
URL: "/",
|
||||
})
|
||||
mainWindow.Center()
|
||||
settingsWindow := app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
|
||||
Title: "voidraft设置",
|
||||
Width: 500,
|
||||
Height: 600,
|
||||
Hidden: true, // 初始时隐藏设置窗口
|
||||
AlwaysOnTop: true,
|
||||
Mac: application.MacWindow{
|
||||
Backdrop: application.MacBackdropTranslucent,
|
||||
TitleBar: application.MacTitleBarHiddenInset,
|
||||
InvisibleTitleBarHeight: 50,
|
||||
},
|
||||
Windows: application.WindowsWindow{},
|
||||
BackgroundColour: application.NewRGB(27, 38, 54),
|
||||
URL: "/settings",
|
||||
})
|
||||
settingsWindow.Center()
|
||||
|
||||
// 设置系统托盘
|
||||
systray.SetupSystemTray(app, mainWindow, assets)
|
||||
systray.SetupSystemTray(app, mainWindow, settingsWindow, assets)
|
||||
|
||||
// Create a goroutine that emits an event containing the current time every second.
|
||||
// The frontend can listen to this event and update the UI accordingly.
|
||||
|
Reference in New Issue
Block a user