From 08315b0f281d5871ed3dafb1a3ec89bfea33571e Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 11 Nov 2020 16:44:30 +0100 Subject: ui: use resource numbers instead of resource indices This makes it stable between Windows versions. HOWEVER! We're still using "1" instead of SHIDI_SHIELD_INTERNAL, because the latter is named instead of numbered. This is a TODO item. Signed-off-by: Jason A. Donenfeld --- ui/iconprovider.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui/iconprovider.go') diff --git a/ui/iconprovider.go b/ui/iconprovider.go index 8a5a8265..1fca815d 100644 --- a/ui/iconprovider.go +++ b/ui/iconprovider.go @@ -73,11 +73,11 @@ func iconForState(state manager.TunnelState, size int) (icon *walk.Icon, err err } switch state { case manager.TunnelStarted: - icon, err = loadSystemIcon("imageres", 101, size) + icon, err = loadSystemIcon("imageres", -106, size) case manager.TunnelStopped: icon, err = walk.NewIconFromResourceIdWithSize(8, walk.Size{size, size}) // TODO: replace with real icon from imageres/shell32 default: - icon, err = loadSystemIcon("shell32", 238, size) // TODO: this doesn't look that great overlayed on the app icon + icon, err = loadSystemIcon("shell32", -16739, size) // TODO: this doesn't look that great overlayed on the app icon } if err == nil { cachedIconsForWidthAndState[widthAndState{size, state}] = icon -- cgit v1.2.3-59-g8ed1b