mirror of
https://github.com/netbirdio/systray.git
synced 2026-05-22 17:08:41 -07:00
This changes the default behavior to use libayatana-appindicator
instead of libappindicator. If you need to link to the older
libappindicator library, use the build tag "legacy_appindicator":
go build -tags=legacy_appindicator
Closes #225, #224, and #191.
22 lines
931 B
Go
22 lines
931 B
Go
package systray
|
|
|
|
// SetTemplateIcon sets the systray icon as a template icon (on macOS), falling back
|
|
// to a regular icon on other platforms.
|
|
// templateIconBytes and iconBytes should be the content of .ico for windows and
|
|
// .ico/.jpg/.png for other platforms.
|
|
func SetTemplateIcon(templateIconBytes []byte, regularIconBytes []byte) {
|
|
SetIcon(regularIconBytes)
|
|
}
|
|
|
|
// 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) {
|
|
}
|
|
|
|
// SetTemplateIcon sets the icon of a menu item as a template icon (on macOS). On Windows, it
|
|
// falls back to the regular icon bytes and on Linux it does nothing.
|
|
// templateIconBytes and regularIconBytes should be the content of .ico for windows and
|
|
// .ico/.jpg/.png for other platforms.
|
|
func (item *MenuItem) SetTemplateIcon(templateIconBytes []byte, regularIconBytes []byte) {
|
|
}
|