tui: add contentStyle, applied to overall viewport content
This commit is contained in:
parent
5e26ee3373
commit
50ad7d9ec6
@ -78,6 +78,9 @@ var (
|
|||||||
headerStyle = lipgloss.NewStyle().
|
headerStyle = lipgloss.NewStyle().
|
||||||
PaddingLeft(1).
|
PaddingLeft(1).
|
||||||
Background(lipgloss.Color("0"))
|
Background(lipgloss.Color("0"))
|
||||||
|
contentStyle = lipgloss.NewStyle().
|
||||||
|
PaddingTop(1).
|
||||||
|
PaddingBottom(1)
|
||||||
footerStyle = lipgloss.NewStyle().
|
footerStyle = lipgloss.NewStyle().
|
||||||
Faint(true).
|
Faint(true).
|
||||||
BorderTop(true).
|
BorderTop(true).
|
||||||
@ -340,7 +343,7 @@ func (m *model) updateContent() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
atBottom := m.content.AtBottom()
|
atBottom := m.content.AtBottom()
|
||||||
m.content.SetContent(sb.String())
|
m.content.SetContent(contentStyle.Render(sb.String()))
|
||||||
if atBottom {
|
if atBottom {
|
||||||
// if we were at bottom before the update, scroll with the output
|
// if we were at bottom before the update, scroll with the output
|
||||||
m.content.GotoBottom()
|
m.content.GotoBottom()
|
||||||
|
Loading…
Reference in New Issue
Block a user