~gpanders/ijq

f06b3963cc2c9cedf7b6ba7ecb4286fe8c669d6a — Gregory Anders 26 days ago 646d468
Use ColorDefault for text color in input field

Instead of globally specifying the PrimaryTextColor, explicitly set the
text color only on the InputField primitive. Modifying the
PrimaryTextColor style has the unintended side effect of also modifying
the colors used by the autocompletion list.
1 files changed, 2 insertions(+), 3 deletions(-)

M main.go
M main.go => main.go +2 -3
@@ 222,7 222,6 @@ func createApp(doc Document) *tview.Application {
	tview.Styles.BorderColor = tcell.ColorDefault
	tview.Styles.TitleColor = tcell.ColorDefault
	tview.Styles.GraphicsColor = tcell.ColorDefault
	tview.Styles.PrimaryTextColor = tcell.ColorDefault

	inputView := tview.NewTextView()
	inputView.SetDynamicColors(true).SetTitle("Input").SetBorder(true)


@@ 245,7 244,7 @@ func createApp(doc Document) *tview.Application {
	filterInput.
		SetText(doc.filter).
		SetFieldBackgroundColor(tcell.ColorDefault).
		SetFieldTextColor(tcell.ColorSilver).
		SetFieldTextColor(tcell.ColorDefault).
		SetChangedFunc(func(text string) {
			go app.QueueUpdateDraw(func() {
				errorView.Clear()


@@ 261,7 260,7 @@ func createApp(doc Document) *tview.Application {
					return
				}

				filterInput.SetFieldTextColor(tcell.ColorSilver)
				filterInput.SetFieldTextColor(tcell.ColorDefault)
				outputView.ScrollToBeginning()
			})
		}).