Does not use the template icon for regular icons

This commit is contained in:
Sithembiso Khumalo
2020-09-13 18:51:04 +02:00
committed by GitHub
parent 33b837f4b9
commit 5d5640732e
+2 -1
View File
@@ -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