Skip to content

Commit

Permalink
Added info about SetIcon on menu items to readme and example
Browse files Browse the repository at this point in the history
  • Loading branch information
jefvel committed Oct 16, 2018
1 parent 708e72e commit b17355f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ func onReady() {
systray.SetTitle("Awesome App")
systray.SetTooltip("Pretty awesome超级棒")
mQuit := systray.AddMenuItem("Quit", "Quit the whole app")

// Sets the icon of a menu item. Only available on Mac.
mQuit.SetIcon(icon.Data)
}

func onExit() {
Expand Down
4 changes: 4 additions & 0 deletions example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ func onReady() {
systray.AddMenuItem("Ignored", "Ignored")
mUrl := systray.AddMenuItem("Open Lantern.org", "my home")
mQuit := systray.AddMenuItem("退出", "Quit the whole app")

// Sets the icon of a menu item. Only available on Mac.
mQuit.SetIcon(icon.Data)

systray.AddSeparator()
mToggle := systray.AddMenuItem("Toggle", "Toggle the Quit button")
shown := true
Expand Down

0 comments on commit b17355f

Please sign in to comment.