updated icon

This commit is contained in:
aomizu
2025-05-19 09:54:32 +09:00
parent aa1bbe0938
commit d0d449e292
4 changed files with 27 additions and 1 deletions

BIN
Icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 KiB

After

Width:  |  Height:  |  Size: 313 KiB

View File

@@ -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

View File

@@ -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")

View File

@@ -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,