mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Add the ability to display no title
This commit is contained in:
parent
04616ddff5
commit
e059eeb625
10
view/base.go
10
view/base.go
@ -61,11 +61,15 @@ func (base *Base) ConfigText() string {
|
||||
}
|
||||
|
||||
func (base *Base) ContextualTitle(defaultStr string) string {
|
||||
if base.FocusChar() == "" {
|
||||
if defaultStr == "" && base.FocusChar() == "" {
|
||||
return ""
|
||||
} else if defaultStr != "" && base.FocusChar() == "" {
|
||||
return fmt.Sprintf(" %s ", defaultStr)
|
||||
} else if defaultStr == "" && base.FocusChar() != "" {
|
||||
return fmt.Sprintf(" [darkgray::u]%s[::-][green] ", base.FocusChar())
|
||||
} else {
|
||||
return fmt.Sprintf(" %s [darkgray::u]%s[::-][green] ", defaultStr, base.FocusChar())
|
||||
}
|
||||
|
||||
return fmt.Sprintf(" %s [darkgray::u]%s[::-][green] ", defaultStr, base.FocusChar())
|
||||
}
|
||||
|
||||
func (base *Base) Disable() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user