mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 22:55:48 +01:00
[windows] Improve Set window icon when in debug mode
This commit is contained in:
parent
eee373f15a
commit
88ff84f5a5
1 changed files with 6 additions and 7 deletions
|
|
@ -271,14 +271,13 @@ func (w *windowsWebviewWindow) run() {
|
|||
if !options.Windows.DisableIcon {
|
||||
// App icon ID is 3
|
||||
icon, err := NewIconFromResource(w32.GetModuleHandle(""), uint16(3))
|
||||
if err == nil {
|
||||
w.setIcon(icon)
|
||||
} else {
|
||||
// Load the icon from the application icon bytes
|
||||
if err != nil {
|
||||
icon, err = w32.CreateLargeHIconFromImage(globalApplication.options.Icon)
|
||||
if err == nil {
|
||||
w.setIcon(icon)
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
globalApplication.Logger.Warn("Failed to load icon: %v", err)
|
||||
} else {
|
||||
w.setIcon(icon)
|
||||
}
|
||||
} else {
|
||||
w.disableIcon()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue