mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
Fixed icon warning on Windows
This commit is contained in:
parent
5fcebd0274
commit
33a0c9e634
1 changed files with 5 additions and 4 deletions
|
|
@ -296,11 +296,12 @@ func (w *windowsWebviewWindow) run() {
|
|||
// App icon ID is 3
|
||||
icon, err := NewIconFromResource(w32.GetModuleHandle(""), uint16(3))
|
||||
if err != nil {
|
||||
icon, err = w32.CreateLargeHIconFromImage(globalApplication.options.Icon)
|
||||
// Try loading from the given icon
|
||||
if globalApplication.options.Icon != nil {
|
||||
icon, _ = w32.CreateLargeHIconFromImage(globalApplication.options.Icon)
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
globalApplication.Logger.Warn("Failed to load icon: %v", err)
|
||||
} else {
|
||||
if icon != 0 {
|
||||
w.setIcon(icon)
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue