aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/iconprovider.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-11-11 16:44:30 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-11-16 18:17:05 +0100
commit08315b0f281d5871ed3dafb1a3ec89bfea33571e (patch)
tree510f844663cd9d34c76369443bab8045a12ef2bd /ui/iconprovider.go
parentui: remove systray popup menu tunnel list (diff)
downloadwireguard-windows-08315b0f281d5871ed3dafb1a3ec89bfea33571e.tar.xz
wireguard-windows-08315b0f281d5871ed3dafb1a3ec89bfea33571e.zip
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 <Jason@zx2c4.com>
Diffstat (limited to 'ui/iconprovider.go')
-rw-r--r--ui/iconprovider.go4
1 files changed, 2 insertions, 2 deletions
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