summaryrefslogtreecommitdiffstatshomepage
path: root/imagelist.go
diff options
context:
space:
mode:
authorAlexander Neumann <alexander.neumann@picos-software.com>2017-02-28 14:13:37 +0100
committerAlexander Neumann <alexander.neumann@picos-software.com>2017-02-28 14:13:37 +0100
commit93f3fc9f3378585dc2ca3fbb6f1cdbd445447135 (patch)
tree810b2e4a395f915e0cd5b40c4afa140479b29d79 /imagelist.go
parentUse some new stuff in webview example (diff)
downloadwireguard-windows-93f3fc9f3378585dc2ca3fbb6f1cdbd445447135.tar.xz
wireguard-windows-93f3fc9f3378585dc2ca3fbb6f1cdbd445447135.zip
Fix image list creation regression
Diffstat (limited to 'imagelist.go')
-rw-r--r--imagelist.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/imagelist.go b/imagelist.go
index 6c6c75e0..13cd6a09 100644
--- a/imagelist.go
+++ b/imagelist.go
@@ -84,6 +84,12 @@ func (il *ImageList) MaskColor() Color {
}
func imageListForImage(image interface{}) (hIml win.HIMAGELIST, isSysIml bool, err error) {
+ if name, ok := image.(string); ok {
+ if img, err := Resources.Image(name); err == nil {
+ image = img
+ }
+ }
+
if filePath, ok := image.(string); ok {
_, hIml = iconIndexAndHImlForFilePath(filePath)
isSysIml = hIml != 0