List does not remove color when item is no longer focused #45

Closed
opened 2020-12-13 12:56:37 +00:00 by raziman · 2 comments
raziman commented 2020-12-13 12:56:37 +00:00 (Migrated from gitlab.com)

As the title says, List primitive does not remove highlight color when item is no longer focused. This only happen when SetBackgroundTransparent method for List is set to true. This bug can be reproduced with the following source code.

package main

import (
	"fmt"

	"gitlab.com/tslocum/cview"
)

func main() {
	app := cview.NewApplication()
	app.EnableMouse(true)

	list := cview.NewList()
	list.SetBackgroundTransparent(true)
	list.SetHighlightFullLine(true)

	for i := 0; i < 10; i++ {

		item := cview.NewListItem(fmt.Sprintf("%d", i))

		list.AddItem(item)
	}

	app.SetRoot(list, true)
	if err := app.Run(); err != nil {
		panic(err)
	}
}

As the title says, `List` primitive does not remove highlight color when item is no longer focused. This only happen when `SetBackgroundTransparent` method for `List` is set to true. This bug can be reproduced with the following source code. ```golang package main import ( "fmt" "gitlab.com/tslocum/cview" ) func main() { app := cview.NewApplication() app.EnableMouse(true) list := cview.NewList() list.SetBackgroundTransparent(true) list.SetHighlightFullLine(true) for i := 0; i < 10; i++ { item := cview.NewListItem(fmt.Sprintf("%d", i)) list.AddItem(item) } app.SetRoot(list, true) if err := app.Run(); err != nil { panic(err) } } ```
tslocum commented 2020-12-15 18:34:46 +00:00 (Migrated from gitlab.com)

Thanks for reporting this.

Thanks for reporting this.
tslocum commented 2020-12-16 23:54:55 +00:00 (Migrated from gitlab.com)

mentioned in commit 1af0da7606

mentioned in commit 1af0da7606b8476944b5740bb4f0b711aaf2a1df
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tslocum/cview#45
No description provided.