diff options
| author | Joesis | 2019-01-30 23:21:42 -0800 |
|---|---|---|
| committer | Joesis | 2019-01-30 23:21:42 -0800 |
| commit | d134bdd4d8106f599ff44fbad0053db7cf4d3d74 (patch) | |
| tree | 4c67b3634fc5e765d40199a1ca1a5428b6f87132 | |
| parent | 0daad7b8e5bd9533578e674141123f6a264a7454 (diff) | |
| download | systray-test-pr-78.tar.bz2 | |
try PR #78test-pr-78
| -rw-r--r-- | example/icon/iconwin.ico | bin | 4286 -> 29134 bytes | |||
| -rw-r--r-- | systray_windows.go | 7 |
2 files changed, 4 insertions, 3 deletions
diff --git a/example/icon/iconwin.ico b/example/icon/iconwin.ico Binary files differindex 24539c7..4a7c3ae 100644 --- a/example/icon/iconwin.ico +++ b/example/icon/iconwin.ico diff --git a/systray_windows.go b/systray_windows.go index 9bbb3d1..42984e1 100644 --- a/systray_windows.go +++ b/systray_windows.go @@ -183,6 +183,7 @@ type winTray struct { func (t *winTray) setIcon(src string) error { const IMAGE_ICON = 1 // Loads an icon const LR_LOADFROMFILE = 0x00000010 // Loads the stand-alone image from the file + const LR_DEFAULTSIZE = 0x00000040 // Loads default-size icon for windows(16 x 16) if cx, cy are set to zero const NIF_ICON = 0x00000002 // Save and reuse handles of loaded images @@ -196,9 +197,9 @@ func (t *winTray) setIcon(src string) error { 0, uintptr(unsafe.Pointer(srcPtr)), IMAGE_ICON, - 64, - 64, - LR_LOADFROMFILE, + 0, + 0, + LR_LOADFROMFILE|LR_DEFAULTSIZE, ) if res == 0 { return err |
