~chrisppy/beagles

6754a4c2d075f4bb2eddd7e9a59aff9901934b13 — Chris Palmer 7 months ago 86a6049
Suppress cview default tree and list input handler
2 files changed, 4 insertions(+), 1 deletions(-)

M ui/list.go
M ui/tree.go
M ui/list.go => ui/list.go +2 -0
@@ 24,6 24,7 @@ import (
	"time"

	"git.sr.ht/~chrisppy/beagles/db"
	"github.com/gdamore/tcell/v2"
	tui "gitlab.com/tslocum/cview"
)



@@ 54,6 55,7 @@ func (i *UI) newList(l listType) *list {
	view := tui.NewList()
	view.ShowSecondaryText(false)

	view.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { return nil })
	view.SetBackgroundColor(i.Config.Theme.ListBGColor)
	view.SetMainTextColor(i.Config.Theme.ListFGColor)


M ui/tree.go => ui/tree.go +2 -1
@@ 46,7 46,7 @@ func (i *UI) newTree() *tree {

	view.SetBackgroundColor(i.Config.Theme.TreeBGColor)
	view.SetGraphicsColor(i.Config.Theme.TreeFGColor)

	view.SetInputCapture(nil)
	node := tui.NewTreeNode("subscriptions")
	node.SetColor(i.Config.Theme.TreeFGColor)



@@ 55,6 55,7 @@ func (i *UI) newTree() *tree {

	view.SetRoot(node)
	view.SetCurrentNode(node)
	view.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { return nil })

	w := &tree{
		Widget:      view,