tview icon indicating copy to clipboard operation
tview copied to clipboard

Wrong color in DropDown SetListStyles

Open eeeXun opened this issue 1 month ago • 0 comments

In the following code, I want to set unselected background color to red.

package main

import (
	"github.com/gdamore/tcell/v2"
	"github.com/rivo/tview"
)

func main() {
	app := tview.NewApplication()
	dropdown := tview.NewDropDown().
		SetLabel("Select an option (hit Enter): ").
		SetOptions([]string{"A", "AA", "AAA", "AAAA", "AAAAA"}, nil)
	dropdown.SetListStyles(tcell.StyleDefault.Background(tcell.ColorRed), tcell.StyleDefault)
	if err := app.SetRoot(dropdown, true).SetFocus(dropdown).Run(); err != nil {
		panic(err)
	}
}

This is before 03bdc867bee4ce7355079090c396d9ec861fc4bb image

This is after 03bdc867bee4ce7355079090c396d9ec861fc4bb, some areas did not change to red. image

eeeXun avatar May 21 '24 15:05 eeeXun