Skip to content

Commit 6bdd4a5

Browse files
committed
center group stages
1 parent b561d64 commit 6bdd4a5

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

internal/tui/views.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ func (m Model) renderStatusLine() string {
8686

8787
func (m Model) renderScrollBody(availableRows int) string {
8888
body := m.renderBody()
89+
90+
// When the content fits, center it vertically so the group cards sit in the
91+
// middle of the screen instead of being pinned to the top. Only fall back to
92+
// the scrolling viewport when the content is too tall to show at once.
93+
if lipgloss.Height(body) <= availableRows {
94+
return lipgloss.Place(lipgloss.Width(body), availableRows, lipgloss.Center, lipgloss.Center, body)
95+
}
96+
8997
vp := m.viewport
9098
vp.Width = min(max(20, m.width-2), max(20, lipgloss.Width(body)))
9199
vp.Height = availableRows

0 commit comments

Comments
 (0)