changed selected bg color

This commit is contained in:
Dongdong Zhou 2017-04-11 10:52:00 +01:00
parent 2f1cbc1df5
commit d7de9f8483
2 changed files with 4 additions and 2 deletions

View file

@ -47,6 +47,7 @@ type Editor struct {
width int
height int
selectedBg *RGBA
matchFg *RGBA
}
func initWindow(box *ui.Box, width, height int) *ui.Window {
@ -125,7 +126,8 @@ func InitEditor() error {
font: font,
cols: 0,
rows: 0,
selectedBg: newRGBA(81, 154, 186, 0.5),
selectedBg: newRGBA(81, 154, 186, 0.6),
matchFg: newRGBA(81, 154, 186, 1),
}
editor.resize()

View file

@ -209,7 +209,7 @@ func (f *Finder) showResult(args []interface{}) {
itemHandler := &SpanHandler{}
itemSpan := ui.NewArea(itemHandler)
itemHandler.span = itemSpan
itemHandler.matchColor = newRGBA(81, 154, 186, 1)
itemHandler.matchColor = editor.matchFg
y := height * (i + 1)
ui.QueueMain(func() {
f.box.Append(itemSpan, false)