mirror of
https://github.com/rivo/tview.git
synced 2024-11-03 09:40:25 +00:00
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
BIN
demos/postgres.png
Normal file
BIN
demos/postgres.png
Normal file
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
Block a user