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 -3
View File
@@ -23,9 +23,9 @@ import (
"github.com/charmbracelet/bubbles/viewport"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/illusionman1212/gorc/cmds"
"github.com/illusionman1212/gorc/irc"
"github.com/illusionman1212/gorc/ui"
)
type SidePanelState struct {
@@ -101,12 +101,12 @@ func (s SidePanelState) Update(msg tea.Msg) (SidePanelState, tea.Cmd) {
func (s *SidePanelState) Focus() {
s.Focused = true
s.Viewport.Style = s.Viewport.Style.BorderForeground(lipgloss.Color("105"))
s.Viewport.Style = s.Viewport.Style.BorderForeground(ui.AccentColor)
}
func (s *SidePanelState) Blur() {
s.Focused = false
s.Viewport.Style = s.Viewport.Style.BorderForeground(lipgloss.Color("#EEE"))
s.Viewport.Style = s.Viewport.Style.BorderForeground(ui.PrimaryColor)
}
func (s *SidePanelState) UpdateNicks() {