Skip to content

Commit 008a105

Browse files
authored
Merge pull request getlantern#171 from lepsta/master
Does not use the template icon for regular icons
2 parents c6bfc69 + f81f283 commit 008a105

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

systray_darwin.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ func SetTemplateIcon(templateIconBytes []byte, regularIconBytes []byte) {
2424
// SetIcon sets the icon of a menu item. Only works on macOS and Windows.
2525
// iconBytes should be the content of .ico/.jpg/.png
2626
func (item *MenuItem) SetIcon(iconBytes []byte) {
27-
item.SetTemplateIcon(iconBytes, iconBytes)
27+
cstr := (*C.char)(unsafe.Pointer(&iconBytes[0]))
28+
C.setMenuItemIcon(cstr, (C.int)(len(iconBytes)), C.int(item.id), false)
2829
}
2930

3031
// SetTemplateIcon sets the icon of a menu item as a template icon (on macOS). On Windows, it

0 commit comments

Comments
 (0)