refactored and redesigned ui

This commit is contained in:
aomizu
2025-06-07 13:37:21 +09:00
parent c7746af7da
commit 3460969409
7 changed files with 669 additions and 378 deletions

20
main.go
View File

@@ -18,10 +18,10 @@ import (
const appVersion = "1.1.2"
func main() {
myApp := app.NewWithID("com.tairasu.turtlesilicon")
myWindow := myApp.NewWindow("TurtleSilicon v" + appVersion)
myWindow.Resize(fyne.NewSize(650, 500))
myWindow.SetFixedSize(true)
TSApp := app.NewWithID("com.tairasu.turtlesilicon")
TSWindow := TSApp.NewWindow("TurtleSilicon v" + appVersion)
TSWindow.Resize(fyne.NewSize(650, 500))
TSWindow.SetFixedSize(true)
// Check for updates
go func() {
@@ -47,19 +47,19 @@ func main() {
prefs.SuppressedUpdateVersion = latestVersion
utils.SavePrefs(prefs)
}
}, myWindow)
}, TSWindow)
}
}()
content := ui.CreateUI(myWindow)
myWindow.SetContent(content)
content := ui.CreateUI(TSWindow)
TSWindow.SetContent(content)
// Set up cleanup when window closes
myWindow.SetCloseIntercept(func() {
TSWindow.SetCloseIntercept(func() {
log.Println("Application closing, cleaning up RosettaX87 service...")
service.CleanupService()
myApp.Quit()
TSApp.Quit()
})
myWindow.ShowAndRun()
TSWindow.ShowAndRun()
}