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

Set Twitter Stats wrap to false (#745)

Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
Chris Cummer 2019-11-12 20:10:39 -08:00 committed by GitHub
parent bf85d4b144
commit c6a10295c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -23,7 +23,7 @@ func NewWidget(app *tview.Application, pages *tview.Pages, settings *Settings) *
}
widget.View.SetBorderPadding(1, 1, 1, 1)
widget.View.SetWrap(true)
widget.View.SetWrap(false)
widget.View.SetWordWrap(true)
return &widget
@ -55,5 +55,5 @@ func (widget *Widget) content() (string, string, bool) {
)
}
return "Twitter Stats", str, true
return "Twitter Stats", str, false
}

View File

@ -32,6 +32,7 @@ func (widget *TextWidget) TextView() *tview.TextView {
func (widget *TextWidget) Redraw(data func() (string, string, bool)) {
widget.app.QueueUpdateDraw(func() {
title, content, wrap := data()
widget.View.Clear()
widget.View.SetWrap(wrap)
widget.View.SetTitle(widget.ContextualTitle(title))