mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 16:40:41 +08:00
Fix icon issue for darwin.
This commit is contained in:
parent
f454abf45a
commit
b0fb67451d
@ -354,7 +354,6 @@ tasks:
|
||||
generates:
|
||||
- "icons.icns"
|
||||
- "icons.ico"
|
||||
method: timestamp
|
||||
cmds:
|
||||
# Generates both .ico and .icns files
|
||||
- wails3 generate icons -input appicon.png
|
||||
|
@ -22,7 +22,6 @@ import (
|
||||
"github.com/wailsapp/wails/v3/internal/assetserver/webview"
|
||||
"github.com/wailsapp/wails/v3/internal/capabilities"
|
||||
"github.com/wailsapp/wails/v3/pkg/events"
|
||||
"github.com/wailsapp/wails/v3/pkg/icons"
|
||||
)
|
||||
|
||||
//go:embed assets/*
|
||||
@ -162,9 +161,6 @@ func mergeApplicationDefaults(o *Options) {
|
||||
if o.Description == "" {
|
||||
o.Description = "An application written using Wails"
|
||||
}
|
||||
if o.Icon == nil {
|
||||
o.Icon = icons.ApplicationLightMode256
|
||||
}
|
||||
}
|
||||
|
||||
type (
|
||||
@ -549,7 +545,9 @@ func (a *App) Run() error {
|
||||
if runtime.GOOS == "darwin" {
|
||||
a.impl.setApplicationMenu(a.ApplicationMenu)
|
||||
}
|
||||
a.impl.setIcon(a.options.Icon)
|
||||
if a.options.Icon != nil {
|
||||
a.impl.setIcon(a.options.Icon)
|
||||
}
|
||||
|
||||
err = a.impl.run()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user