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

List highlights span entire widget width

This commit is contained in:
Chris Cummer
2018-07-18 10:06:28 -07:00
parent 13780f0ece
commit 1be970eaec
4 changed files with 22 additions and 12 deletions

View File

@@ -50,5 +50,10 @@ func (widget *Widget) formattedItemLine(item *wtf.ChecklistItem, selectedItem *w
tview.Escape(item.Text),
)
_, _, w, _ := widget.View.GetInnerRect()
if w > maxLen {
maxLen = w
}
return str + wtf.PadRow((checkWidth+len(item.Text)), (checkWidth+maxLen+1)) + "\n"
}