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

Make Transmission widget scrollable

This commit is contained in:
Chris Cummer
2019-06-26 06:57:32 -07:00
parent 9244d60abe
commit 5dbce09e4f
4 changed files with 64 additions and 22 deletions

View File

@@ -17,15 +17,15 @@ func (widget *Widget) display() {
title := fmt.Sprintf("[green]%s[white]", proj.Project.Name)
str := ""
for index, item := range proj.tasks {
for idx, item := range proj.tasks {
row := fmt.Sprintf(
`[%s]| | %s[%s]`,
widget.RowColor(index),
widget.RowColor(idx),
tview.Escape(item.Content),
widget.RowColor(index),
widget.RowColor(idx),
)
str += wtf.HighlightableHelper(widget.View, row, index, len(item.Content))
str += wtf.HighlightableHelper(widget.View, row, idx, len(item.Content))
}
widget.ScrollableWidget.Redraw(title, str, false)