mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Merge pull request #625 from wtfutil/20190910-no-title
Add the ability to display no title
This commit is contained in:
commit
9b23da07ba
10
view/base.go
10
view/base.go
@ -61,12 +61,16 @@ func (base *Base) ConfigText() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (base *Base) ContextualTitle(defaultStr string) 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)
|
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() {
|
func (base *Base) Disable() {
|
||||||
base.enabled = false
|
base.enabled = false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user