fix: background color rendering issues

This commit is contained in:
adamdottv
2025-06-15 05:57:15 -05:00
parent 7351e12886
commit b8a89dab0f
4 changed files with 36 additions and 150 deletions

View File

@@ -275,9 +275,15 @@ func (m *messagesComponent) View() string {
if m.rendering {
return m.viewport.View()
}
t := theme.CurrentTheme()
return lipgloss.JoinVertical(
lipgloss.Left,
lipgloss.PlaceHorizontal(m.width, lipgloss.Center, m.header()),
lipgloss.PlaceHorizontal(
m.width,
lipgloss.Center,
m.header(),
lipgloss.WithWhitespaceStyle(lipgloss.NewStyle().Background(t.Background())),
),
m.viewport.View(),
)
}
@@ -346,13 +352,20 @@ func (m *messagesComponent) home() string {
lines = append(lines, "")
}
return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center,
t := theme.CurrentTheme()
return lipgloss.Place(
m.width,
m.height,
lipgloss.Center,
lipgloss.Center,
baseStyle.Width(lipgloss.Width(logoAndVersion)).Render(
lipgloss.JoinVertical(
lipgloss.Top,
lines...,
),
))
),
lipgloss.WithWhitespaceStyle(lipgloss.NewStyle().Background(t.Background())),
)
}
func (m *messagesComponent) SetSize(width, height int) tea.Cmd {