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