mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Refactor TrayOptions to Tray. Add ID.
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
package menu
|
||||
|
||||
// TrayOptions are the options
|
||||
type TrayOptions struct {
|
||||
// Tray are the options
|
||||
type Tray struct {
|
||||
|
||||
// The ID of this tray
|
||||
ID string
|
||||
|
||||
// Label is the text we wish to display in the tray
|
||||
Label string
|
||||
|
||||
@@ -9,6 +9,6 @@ type Options struct {
|
||||
WebviewIsTransparent bool
|
||||
WindowBackgroundIsTranslucent bool
|
||||
Menu *menu.Menu
|
||||
Tray *menu.TrayOptions
|
||||
Tray *menu.Tray
|
||||
ContextMenus *menu.ContextMenus
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ type App struct {
|
||||
DevTools bool
|
||||
RGBA int
|
||||
ContextMenus *menu.ContextMenus
|
||||
Tray *menu.TrayOptions
|
||||
Tray *menu.Tray
|
||||
Menu *menu.Menu
|
||||
Mac *mac.Options
|
||||
Logger logger.Logger `json:"-"`
|
||||
@@ -41,8 +41,8 @@ func MergeDefaults(appoptions *App) {
|
||||
|
||||
}
|
||||
|
||||
func GetTray(appoptions *App) *menu.TrayOptions {
|
||||
var result *menu.TrayOptions
|
||||
func GetTray(appoptions *App) *menu.Tray {
|
||||
var result *menu.Tray
|
||||
switch runtime.GOOS {
|
||||
case "darwin":
|
||||
if appoptions.Mac != nil {
|
||||
|
||||
Reference in New Issue
Block a user