mirror of
https://github.com/taigrr/wails.git
synced 2026-04-16 19:55:05 -07:00
Support Hidden/Disabled. Normal->Text
This commit is contained in:
@@ -6,19 +6,17 @@ type MenuItem struct {
|
||||
Role Role `json:"Role,omitempty"`
|
||||
Accelerator string `json:"Accelerator,omitempty"`
|
||||
Type Type
|
||||
Enabled bool
|
||||
Visible bool
|
||||
Disabled bool
|
||||
Hidden bool
|
||||
Checked bool
|
||||
SubMenu []*MenuItem `json:"SubMenu,omitempty"`
|
||||
}
|
||||
|
||||
func Text(label string, id string) *MenuItem {
|
||||
return &MenuItem{
|
||||
Id: id,
|
||||
Label: label,
|
||||
Type: NormalType,
|
||||
Enabled: true,
|
||||
Visible: true,
|
||||
Id: id,
|
||||
Label: label,
|
||||
Type: TextType,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ package menu
|
||||
type Type string
|
||||
|
||||
const (
|
||||
// NormalType is the Normal menuitem type
|
||||
NormalType Type = "Normal"
|
||||
// TextType is the text menuitem type
|
||||
TextType Type = "Text"
|
||||
// SeparatorType is the Separator menuitem type
|
||||
SeparatorType Type = "Separator"
|
||||
// SubmenuType is the Submenu menuitem type
|
||||
|
||||
Reference in New Issue
Block a user