mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-05 01:50:56 +08:00
[windows] Improve Set window icon when in debug mode
This commit is contained in:
parent
eee373f15a
commit
88ff84f5a5
@ -271,14 +271,13 @@ func (w *windowsWebviewWindow) run() {
|
|||||||
if !options.Windows.DisableIcon {
|
if !options.Windows.DisableIcon {
|
||||||
// App icon ID is 3
|
// App icon ID is 3
|
||||||
icon, err := NewIconFromResource(w32.GetModuleHandle(""), uint16(3))
|
icon, err := NewIconFromResource(w32.GetModuleHandle(""), uint16(3))
|
||||||
if err == nil {
|
if err != nil {
|
||||||
w.setIcon(icon)
|
|
||||||
} else {
|
|
||||||
// Load the icon from the application icon bytes
|
|
||||||
icon, err = w32.CreateLargeHIconFromImage(globalApplication.options.Icon)
|
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 {
|
} else {
|
||||||
w.disableIcon()
|
w.disableIcon()
|
||||||
|
Loading…
Reference in New Issue
Block a user