From 09bae529de43108d20adce80da687e94e0a3b939 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 15 Aug 2021 21:27:49 +1000 Subject: [PATCH] [windows-x] Fix icon bug --- v2/internal/frontend/windows/window.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/v2/internal/frontend/windows/window.go b/v2/internal/frontend/windows/window.go index 389ae3eec..820324820 100644 --- a/v2/internal/frontend/windows/window.go +++ b/v2/internal/frontend/windows/window.go @@ -35,11 +35,8 @@ func NewWindow(parent winc.Controller, options *options.App) *Window { result.SetHandle(winc.CreateWindow("wailsWindow", parent, uint(exStyle), uint(dwStyle))) result.SetParent(parent) - // Wails uses 100 for the icon - if ico, err := winc.NewIconFromResource(winc.GetAppInstance(), uint16(100)); err == nil { + if ico, err := winc.NewIconFromResource(winc.GetAppInstance(), uint16(winc.AppIconID)); err == nil { result.SetIcon(0, ico) - } else { - println("No icon!") } result.SetSize(options.Width, options.Height)