Support loading multiple tray icons

This commit is contained in:
Lea Anthony
2020-12-23 06:55:45 +11:00
parent 16b872352d
commit a0774cf71c
7 changed files with 136 additions and 35 deletions
+14 -2
View File
@@ -7,8 +7,20 @@ const (
TrayLabel TrayType = "label"
)
// TrayOptions are the options
type TrayOptions struct {
Type TrayType
// Type is the type of tray item we want
Type TrayType
// Label is what is displayed initially when the type is TrayLabel
Label string
Menu *Menu
// Icon is the name of the tray icon we wish to display.
// These are read up during build from <projectdir>/trayicons and
// the filenames are used as IDs, minus the extension
// EG: <projectdir>/trayicons/main.png can be referenced here with "main"
Icon string
// Menu is the initial menu we wish to use for the tray
Menu *Menu
}