Changing the Color of the Autocomplete Menu
This commit is contained in:
parent
b1199e9b1c
commit
0fc7c61dfb
15
App.go
15
App.go
@ -1,8 +1,8 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/aditya-K2/tview"
|
||||||
"github.com/gdamore/tcell/v2"
|
"github.com/gdamore/tcell/v2"
|
||||||
"github.com/rivo/tview"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var IMG_X, IMG_Y, IMG_W, IMG_H int
|
var IMG_X, IMG_Y, IMG_W, IMG_H int
|
||||||
@ -31,6 +31,10 @@ func newApplication(r *Renderer) *Application {
|
|||||||
})
|
})
|
||||||
|
|
||||||
searchBar.SetTitle("Search").SetTitleAlign(tview.AlignLeft)
|
searchBar.SetTitle("Search").SetTitleAlign(tview.AlignLeft)
|
||||||
|
searchBar.SetAutocompleteBackgroundColor(tcell.GetColor("#15191a"))
|
||||||
|
searchBar.SetAutocompleteSelectBackgroundColor(tcell.GetColor("#e5e5e5"))
|
||||||
|
searchBar.SetAutocompleteMainTextColor(tcell.GetColor("#7f7f7f"))
|
||||||
|
searchBar.SetAutocompleteSelectedTextColor(tcell.GetColor("#111111"))
|
||||||
Navbar.SetBorder(true)
|
Navbar.SetBorder(true)
|
||||||
Navbar.SetSelectable(true, false)
|
Navbar.SetSelectable(true, false)
|
||||||
Navbar.SetCell(0, 0, tview.NewTableCell("PlayList"))
|
Navbar.SetCell(0, 0, tview.NewTableCell("PlayList"))
|
||||||
@ -63,6 +67,15 @@ func newApplication(r *Renderer) *Application {
|
|||||||
App := tview.NewApplication()
|
App := tview.NewApplication()
|
||||||
App.SetRoot(rootPages, true).SetFocus(expandedView)
|
App.SetRoot(rootPages, true).SetFocus(expandedView)
|
||||||
|
|
||||||
|
searchBar.SetDoneFunc(func(k tcell.Key) {
|
||||||
|
switch k {
|
||||||
|
case tcell.KeyEscape:
|
||||||
|
{
|
||||||
|
App.SetFocus(expandedView)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
return &Application{
|
return &Application{
|
||||||
App: App,
|
App: App,
|
||||||
ExpandedView: expandedView,
|
ExpandedView: expandedView,
|
||||||
|
Loading…
Reference in New Issue
Block a user