List selections should be visible even when they don't have focus. Also added screenshot for Postgres demo.

This commit is contained in:
Oliver 2018-01-07 14:37:41 +01:00
parent 615931ac50
commit 7b5ab63e8c
2 changed files with 1 additions and 1 deletions

BIN
demos/postgres.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

View File

@ -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++ {