Prefer OS-specific app icons

This commit is contained in:
Stu Leak 2026-01-04 06:28:21 -05:00
parent 4dcc96c6e1
commit 38bbd8be27

View File

@ -6,6 +6,7 @@ import (
"math" "math"
"os" "os"
"path/filepath" "path/filepath"
"runtime"
"strconv" "strconv"
"strings" "strings"
"sync/atomic" "sync/atomic"
@ -282,8 +283,12 @@ func MakeIconButton(symbol, tooltip string, tapped func()) *widget.Button {
// LoadAppIcon loads the application icon from standard locations // LoadAppIcon loads the application icon from standard locations
func LoadAppIcon() fyne.Resource { func LoadAppIcon() fyne.Resource {
// Try PNG first (better compatibility), then SVG var iconFiles []string
iconFiles := []string{"VT_Icon.png", "VT_Icon.svg"} if runtime.GOOS == "windows" {
iconFiles = []string{"VT_Icon.ico", "VT_Icon.png", "VT_Icon.svg"}
} else {
iconFiles = []string{"VT_Icon.png", "VT_Icon.svg", "VT_Icon.ico"}
}
var search []string var search []string
// Search in current directory first // Search in current directory first