1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

WTF-400 TextWidget properly renders title again

This commit is contained in:
Chris Cummer 2019-04-19 14:06:55 -07:00
parent 6227b2bcdb
commit 6fd9430ef8
2 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,7 @@ func NewCommonSettingsFromYAML(name, configKey string, ymlConfig *config.Config)
Enabled: ymlConfig.UBool(modulePath+".enabled", false), Enabled: ymlConfig.UBool(modulePath+".enabled", false),
FocusChar: ymlConfig.UInt(modulePath+".focusChar", -1), FocusChar: ymlConfig.UInt(modulePath+".focusChar", -1),
RefreshInterval: ymlConfig.UInt(modulePath+".refreshInterval", 300), RefreshInterval: ymlConfig.UInt(modulePath+".refreshInterval", 300),
Title: ymlConfig.UString(modulePath+".title", ""), Title: ymlConfig.UString(modulePath+".title", name),
} }
return &common return &common

View File

@ -135,7 +135,7 @@ func (widget *TextWidget) addView(app *tview.Application, configKey string) {
view.SetBorder(true) view.SetBorder(true)
view.SetDynamicColors(true) view.SetDynamicColors(true)
view.SetTitle(widget.ContextualTitle(widget.name)) view.SetTitle(widget.ContextualTitle(widget.CommonSettings.Title))
view.SetWrap(false) view.SetWrap(false)
view.SetChangedFunc(func() { view.SetChangedFunc(func() {