feat: use adaptive colors to accommodate different terminal bg colors

This commit is contained in:
2022-01-25 01:41:25 +02:00
parent 4132faebe1
commit 3aa54a9127
7 changed files with 75 additions and 48 deletions
+3 -2
View File
@@ -22,6 +22,7 @@ import (
"github.com/charmbracelet/lipgloss"
"github.com/illusionman1212/gorc/cmds"
"github.com/illusionman1212/gorc/ui"
)
type InputState struct {
@@ -64,12 +65,12 @@ func (s InputState) Update(msg tea.Msg) (InputState, tea.Cmd) {
func (s *InputState) Focus() {
s.Input.Focus()
s.Style = s.Style.Copy().BorderForeground(lipgloss.Color("105"))
s.Style = s.Style.Copy().BorderForeground(ui.AccentColor)
}
func (s *InputState) Blur() {
s.Input.Blur()
s.Style = s.Style.Copy().BorderForeground(lipgloss.Color("#EEE"))
s.Style = s.Style.Copy().BorderForeground(ui.PrimaryColor)
}
func (s *InputState) SetSize(width int) {