Using tcell.Colors instead of HardCoding Hex Values
This commit is contained in:
@@ -15,7 +15,7 @@ var (
|
||||
NotificationServer interface {
|
||||
Send(string)
|
||||
}
|
||||
WHITE_AND_BOLD string = "[#ffffff::b]"
|
||||
WHITE_AND_BOLD string = "[white::b]"
|
||||
)
|
||||
|
||||
func SetConnection(c *mpd.Client) {
|
||||
|
||||
@@ -16,14 +16,14 @@ func UpdateBuffSearchView(inputTable *tview.Table, m fuzzy.Matches, f []FileNode
|
||||
} else {
|
||||
for k, v := range m {
|
||||
if len(f[v.Index].Children) != 0 {
|
||||
inputTable.SetCell(k, 0, tview.NewTableCell(utils.GetMatchedString(utils.Unique(v.MatchedIndexes), f[v.Index].Path, "[#0000ff:-:bi]")).
|
||||
inputTable.SetCell(k, 0, tview.NewTableCell(utils.GetMatchedString(utils.Unique(v.MatchedIndexes), f[v.Index].Path, "[blue:-:bi]")).
|
||||
SetAlign(tview.AlignLeft).
|
||||
SetStyle(tcell.StyleDefault.
|
||||
Foreground(tcell.ColorYellow).
|
||||
Background(tcell.ColorBlack).
|
||||
Bold(true)))
|
||||
} else {
|
||||
inputTable.SetCell(k, 0, tview.NewTableCell(utils.GetMatchedString(utils.Unique(v.MatchedIndexes), f[v.Index].Title, "[#fbff00:-:bi]")).
|
||||
inputTable.SetCell(k, 0, tview.NewTableCell(utils.GetMatchedString(utils.Unique(v.MatchedIndexes), f[v.Index].Title, "[yellow:-:bi]")).
|
||||
SetAlign(tview.AlignLeft).
|
||||
SetStyle(tcell.StyleDefault.
|
||||
Foreground(tcell.ColorGreen).
|
||||
|
||||
Reference in New Issue
Block a user