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

Fix missing title in Clocks

This commit is contained in:
Chris Cummer 2019-05-10 08:36:47 -07:00
parent 68ed842c87
commit 075402315e
4 changed files with 6 additions and 8 deletions

View File

@ -27,5 +27,5 @@ func (widget *Widget) display(clocks []Clock, dateFormat string, timeFormat stri
)
}
widget.View.SetText(str)
widget.Redraw(widget.CommonSettings.Title, str, false)
}

View File

@ -90,7 +90,7 @@ func (widget *Widget) display() {
text = text + widget.plainText()
}
widget.Redraw(title, text, false)
widget.Redraw(title, text, true)
}
func (widget *Widget) fileName() string {

View File

@ -88,7 +88,7 @@ func (widget *Widget) display() {
str = str + widget.format(tweet)
}
widget.Redraw(title, str, false)
widget.Redraw(title, str, true)
}
// If the tweet's Username is the same as the account we're watching, no

View File

@ -29,7 +29,7 @@ func (widget *Widget) display() {
if err != "" {
content = err
} else {
title = widget.title(cityData)
title = widget.buildTitle(cityData)
_, _, width, _ := widget.View.GetRect()
content = widget.settings.common.SigilStr(len(widget.Data), widget.Idx, width) + "\n"
content = content + widget.description(cityData) + "\n\n"
@ -73,8 +73,6 @@ func (widget *Widget) temperatures(cityData *owm.CurrentWeatherData) string {
return str
}
func (widget *Widget) title(cityData *owm.CurrentWeatherData) string {
str := fmt.Sprintf("%s %s", widget.emojiFor(cityData), cityData.Name)
return str
// return widget.ContextualTitle(str)
func (widget *Widget) buildTitle(cityData *owm.CurrentWeatherData) string {
return fmt.Sprintf("%s %s", widget.emojiFor(cityData), cityData.Name)
}