make room finder transparent

This commit is contained in:
evan 2018-05-21 11:08:47 -05:00
parent 2fb1925881
commit 8c869b0fd7

View File

@ -24,12 +24,13 @@ import (
"github.com/evidlo/fuzzysearch/fuzzy" "github.com/evidlo/fuzzysearch/fuzzy"
"maunium.net/go/gomuks/debug" "maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/matrix/rooms" "maunium.net/go/gomuks/matrix/rooms"
"maunium.net/go/gomuks/ui/widget"
"maunium.net/go/tcell" "maunium.net/go/tcell"
"maunium.net/go/tview" "maunium.net/go/tview"
) )
type FuzzyView struct { type FuzzyView struct {
*tview.Grid tview.Primitive
matches fuzzy.Ranks matches fuzzy.Ranks
selected int selected int
} }
@ -69,12 +70,9 @@ func NewFuzzyView(view *MainView, width int, height int) *FuzzyView {
var matches fuzzy.Ranks var matches fuzzy.Ranks
var selected int var selected int
fuzz := &FuzzyView{ fuzz := &FuzzyView{
Grid: tview.NewGrid(). Primitive: widget.TransparentCenter(width, height, fuzzyFlex),
SetColumns(0, width, 0). matches: matches,
SetRows(0, height, 0). selected: selected,
AddItem(fuzzyFlex, 1, 1, 1, 1, 0, 0, true),
matches: matches,
selected: selected,
} }
// callback to update search box // callback to update search box