updated icon
This commit is contained in:
BIN
Icon.png
BIN
Icon.png
Binary file not shown.
Before Width: | Height: | Size: 516 KiB After Width: | Height: | Size: 313 KiB |
1
Makefile
1
Makefile
@@ -11,6 +11,7 @@ build:
|
||||
@mkdir -p TurtleSilicon.app/Contents/Resources/winerosetta
|
||||
@cp -R rosettax87/* TurtleSilicon.app/Contents/Resources/rosettax87/
|
||||
@cp -R winerosetta/* TurtleSilicon.app/Contents/Resources/winerosetta/
|
||||
@cp -R Icon.png TurtleSilicon.app/Contents/Resources/
|
||||
@echo "Build complete!"
|
||||
|
||||
# Clean build artifacts
|
||||
|
2
main.go
2
main.go
@@ -6,7 +6,7 @@ import (
|
||||
"turtlesilicon/pkg/ui" // Updated import path
|
||||
)
|
||||
|
||||
const appVersion = "1.0.5" // Added unpatch functionality
|
||||
const appVersion = "1.0.5" // Added logo and unpatch functionality
|
||||
|
||||
func main() {
|
||||
myApp := app.NewWithID("com.tairasu.turtlesilicon")
|
||||
|
25
pkg/ui/ui.go
25
pkg/ui/ui.go
@@ -7,6 +7,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/canvas"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/theme"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
@@ -141,6 +142,29 @@ func CreateUI(myWindow fyne.Window) fyne.CanvasObject {
|
||||
turtlewowStatusLabel = widget.NewRichText()
|
||||
crossoverStatusLabel = widget.NewRichText()
|
||||
|
||||
// Load the application logo
|
||||
logoResource, err := fyne.LoadResourceFromPath("Icon.png")
|
||||
if err != nil {
|
||||
log.Printf("Warning: could not load logo: %v", err)
|
||||
}
|
||||
|
||||
// Create the logo image with a fixed size
|
||||
var logoImage *canvas.Image
|
||||
if logoResource != nil {
|
||||
logoImage = canvas.NewImageFromResource(logoResource)
|
||||
logoImage.FillMode = canvas.ImageFillContain
|
||||
logoImage.SetMinSize(fyne.NewSize(100, 100))
|
||||
}
|
||||
|
||||
// Create a container to center the logo
|
||||
var logoContainer fyne.CanvasObject
|
||||
if logoImage != nil {
|
||||
logoContainer = container.NewCenter(logoImage)
|
||||
} else {
|
||||
// If logo couldn't be loaded, add an empty space for consistent layout
|
||||
logoContainer = container.NewCenter(widget.NewLabel(""))
|
||||
}
|
||||
|
||||
metalHudCheckbox = widget.NewCheck("Enable Metal Hud (show FPS)", func(checked bool) {
|
||||
launcher.EnableMetalHud = checked
|
||||
log.Printf("Metal HUD enabled: %v", launcher.EnableMetalHud)
|
||||
@@ -188,6 +212,7 @@ func CreateUI(myWindow fyne.Window) fyne.CanvasObject {
|
||||
UpdateAllStatuses() // Initial UI state update
|
||||
|
||||
return container.NewVBox(
|
||||
logoContainer,
|
||||
pathSelectionForm,
|
||||
patchOperationsLayout,
|
||||
metalHudCheckbox,
|
||||
|
Reference in New Issue
Block a user