fix(ui): set hex color for ghost text instead of hardcoded ANSI bright-black (#49)

fix #48 

Now ghost text use `#4B4A4C` color instead of hard-coded ANSI color
This commit is contained in:
VERSE
2026-07-28 19:01:44 +07:00
committed by GitHub
parent 93061c89ca
commit 6f488c02cd
+4 -3
View File
@@ -138,6 +138,7 @@ type Theme struct {
DescSel lipgloss.Color DescSel lipgloss.Color
SelBg lipgloss.Color SelBg lipgloss.Color
ScrollInfo lipgloss.Color ScrollInfo lipgloss.Color
GhostText lipgloss.Color
} }
var currentTheme = Theme{ var currentTheme = Theme{
@@ -151,6 +152,7 @@ var currentTheme = Theme{
DescSel: lipgloss.Color("#edecee"), DescSel: lipgloss.Color("#edecee"),
SelBg: lipgloss.Color("#3d375e"), SelBg: lipgloss.Color("#3d375e"),
ScrollInfo: lipgloss.Color("#a277ff"), ScrollInfo: lipgloss.Color("#a277ff"),
GhostText: lipgloss.Color("#4B4A4C"),
} }
func SetTheme(t Theme) { func SetTheme(t Theme) {
@@ -485,9 +487,8 @@ func (o *Overlay) RenderGhostText(buffer string, userNavigated bool, cursorAtEnd
s.WriteString("\0337") s.WriteString("\0337")
if ghostText != "" { if ghostText != "" {
s.WriteString("\033[90m") styled := lipgloss.NewStyle().Foreground(currentTheme.GhostText).Render(ghostText)
s.WriteString(ghostText) s.WriteString(styled)
s.WriteString("\033[0m")
} }
if padLen > 0 { if padLen > 0 {
s.WriteString(strings.Repeat(" ", padLen)) s.WriteString(strings.Repeat(" ", padLen))