Compare commits

...

2 Commits

Author SHA1 Message Date
f1ac74dcbc Fix TabbedContainer not setting tags correctly 2024-08-14 11:45:30 -04:00
ce0bc5be3b Add MenuHeading 2024-08-14 11:45:10 -04:00
2 changed files with 8 additions and 2 deletions

View File

@ -23,3 +23,9 @@ func NewHeading (level int, text string) *Heading {
return this
}
// NewMenuHeading creatss a new heading for use in menus.
func NewMenuHeading (text string) *Heading {
heading := NewHeading(0, text)
heading.SetTag("menu", true)
return heading
}

View File

@ -126,10 +126,10 @@ type tab struct {
func (this *tab) setActive (active bool) {
if active {
this.SetRole(tomo.R("objects", "Tab"))
this.SetTag("active", false)
this.SetTag("active", true)
} else {
this.SetRole(tomo.R("objects", "Tab"))
this.SetTag("active", true)
this.SetTag("active", false)
}
}