mirror of https://github.com/rivo/tview.git
List selections should be visible even when they don't have focus. Also added screenshot for Postgres demo.
This commit is contained in:
parent
615931ac50
commit
7b5ab63e8c
Binary file not shown.
After Width: | Height: | Size: 114 KiB |
2
list.go
2
list.go
|
@ -204,7 +204,7 @@ func (l *List) Draw(screen tcell.Screen) {
|
|||
|
||||
// Main text.
|
||||
color := l.mainTextColor
|
||||
if l.focus.HasFocus() && index == l.currentItem {
|
||||
if index == l.currentItem {
|
||||
textLength := len([]rune(item.MainText))
|
||||
style := tcell.StyleDefault.Background(l.selectedBackgroundColor)
|
||||
for bx := 0; bx < textLength && bx < width; bx++ {
|
||||
|
|
Loading…
Reference in New Issue