From 5d5640732e795bcb2a5bb7d29d7bba462db88808 Mon Sep 17 00:00:00 2001 From: Sithembiso Khumalo Date: Sun, 13 Sep 2020 18:51:04 +0200 Subject: [PATCH] Does not use the template icon for regular icons --- systray_darwin.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/systray_darwin.go b/systray_darwin.go index 3e227ac..740ec5b 100644 --- a/systray_darwin.go +++ b/systray_darwin.go @@ -24,7 +24,8 @@ func SetTemplateIcon(templateIconBytes []byte, regularIconBytes []byte) { // SetIcon sets the icon of a menu item. Only works on macOS and Windows. // iconBytes should be the content of .ico/.jpg/.png func (item *MenuItem) SetIcon(iconBytes []byte) { - item.SetTemplateIcon(iconBytes, iconBytes) + cstr := (*C.char)(unsafe.Pointer(&iconBytes[0])) + C.setMenuItemIcon(cstr, (C.int)(len(iconBytes)), C.int(item.id), false) } // SetTemplateIcon sets the icon of a menu item as a template icon (on macOS). On Windows, it