Prefer OS-specific app icons
This commit is contained in:
parent
4dcc96c6e1
commit
38bbd8be27
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user