mirror of
https://github.com/netbirdio/systray.git
synced 2026-05-22 17:08:41 -07:00
Added info about SetIcon on menu items to readme and example
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user