Skip to content

Commit

Permalink
Merge pull request #1476 from cogentcore/tab-label
Browse files Browse the repository at this point in the history
core: add Tab.Label
  • Loading branch information
rcoreilly authored Feb 15, 2025
2 parents 67d60a9 + adb47b4 commit 01c163b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/tabs.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,3 +553,10 @@ func (tb *Tab) tabs() *Tabs {
}
return nil
}

func (tb *Tab) Label() string {
if tb.Text != "" {
return tb.Text
}
return tb.Name
}

0 comments on commit 01c163b

Please sign in to comment.