diff options
| author | jefvel | 2018-10-16 09:37:27 +0200 | 
|---|---|---|
| committer | jefvel | 2018-10-16 09:37:27 +0200 | 
| commit | 1a665b2c73c12a4cdf5402daef46b1082a822e0d (patch) | |
| tree | d44d0e0f1eaba23282d2f15f602aba0941cd33b9 | |
| parent | 369c5d2d63719b7eecc0c68e8d6c0e11d9b36697 (diff) | |
| download | systray-1a665b2c73c12a4cdf5402daef46b1082a822e0d.tar.bz2 | |
Added info about SetIcon on menu items to readme and example
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | example/main.go | 4 | 
2 files changed, 7 insertions, 0 deletions
| @@ -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() { diff --git a/example/main.go b/example/main.go index f889b3c..5542b89 100644 --- a/example/main.go +++ b/example/main.go @@ -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 | 
