aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorevan <evan@evanw.org>2018-05-21 11:08:47 -0500
committerevan <evan@evanw.org>2018-05-21 11:08:47 -0500
commit8c869b0fd719a7cbbc15c005d899b76466956ab3 (patch)
treeb5a7d351e122747684f0b86dfaac75d261fcdae6 /ui
parent2fb19258815e1ead757d76ef880a4cc0984c6ea2 (diff)
make room finder transparent
Diffstat (limited to 'ui')
-rw-r--r--ui/fuzzy-view.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/ui/fuzzy-view.go b/ui/fuzzy-view.go
index 5efad04..8dd2cf2 100644
--- a/ui/fuzzy-view.go
+++ b/ui/fuzzy-view.go
@@ -24,12 +24,13 @@ import (
"github.com/evidlo/fuzzysearch/fuzzy"
"maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/matrix/rooms"
+ "maunium.net/go/gomuks/ui/widget"
"maunium.net/go/tcell"
"maunium.net/go/tview"
)
type FuzzyView struct {
- *tview.Grid
+ tview.Primitive
matches fuzzy.Ranks
selected int
}
@@ -69,12 +70,9 @@ func NewFuzzyView(view *MainView, width int, height int) *FuzzyView {
var matches fuzzy.Ranks
var selected int
fuzz := &FuzzyView{
- Grid: tview.NewGrid().
- SetColumns(0, width, 0).
- SetRows(0, height, 0).
- AddItem(fuzzyFlex, 1, 1, 1, 1, 0, 0, true),
- matches: matches,
- selected: selected,
+ Primitive: widget.TransparentCenter(width, height, fuzzyFlex),
+ matches: matches,
+ selected: selected,
}
// callback to update search box