diff options
| author | joesis | 2018-10-17 03:05:42 -0700 | 
|---|---|---|
| committer | GitHub | 2018-10-17 03:05:42 -0700 | 
| commit | 89b3d9c45cc69f861868cc7f3159eba2b4cdfb22 (patch) | |
| tree | d44d0e0f1eaba23282d2f15f602aba0941cd33b9 /example/main.go | |
| parent | 3fd1443dac5c8297999189fe28d5836b2b075b66 (diff) | |
| parent | 1a665b2c73c12a4cdf5402daef46b1082a822e0d (diff) | |
| download | systray-89b3d9c45cc69f861868cc7f3159eba2b4cdfb22.tar.bz2 | |
Merge pull request #65 from jefvel/menu-item-icons
Made it possible to add icons to menu items on Mac
Diffstat (limited to 'example/main.go')
| -rw-r--r-- | example/main.go | 4 | 
1 files changed, 4 insertions, 0 deletions
| 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 | 
