Browse Source

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

merge-requests/1/merge
Oliver 5 years ago
parent
commit
7b5ab63e8c
  1. BIN
      demos/postgres.png
  2. 2
      list.go

BIN
demos/postgres.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

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…
Cancel
Save