Skip to content

Commit

Permalink
Merge pull request getlantern#171 from lepsta/master
Browse files Browse the repository at this point in the history
Does not use the template icon for regular icons
  • Loading branch information
joesis authored Sep 14, 2020
2 parents c6bfc69 + f81f283 commit 008a105
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion systray_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 008a105

Please sign in to comment.