mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 10:11:07 +08:00
[windows-x] Fix icon bug
This commit is contained in:
parent
38c507a605
commit
09bae529de
@ -35,11 +35,8 @@ func NewWindow(parent winc.Controller, options *options.App) *Window {
|
|||||||
result.SetHandle(winc.CreateWindow("wailsWindow", parent, uint(exStyle), uint(dwStyle)))
|
result.SetHandle(winc.CreateWindow("wailsWindow", parent, uint(exStyle), uint(dwStyle)))
|
||||||
result.SetParent(parent)
|
result.SetParent(parent)
|
||||||
|
|
||||||
// Wails uses 100 for the icon
|
if ico, err := winc.NewIconFromResource(winc.GetAppInstance(), uint16(winc.AppIconID)); err == nil {
|
||||||
if ico, err := winc.NewIconFromResource(winc.GetAppInstance(), uint16(100)); err == nil {
|
|
||||||
result.SetIcon(0, ico)
|
result.SetIcon(0, ico)
|
||||||
} else {
|
|
||||||
println("No icon!")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
result.SetSize(options.Width, options.Height)
|
result.SetSize(options.Width, options.Height)
|
||||||
|
Loading…
Reference in New Issue
Block a user