From c891295f7c51031837e6b73a2ce1343273557e23 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Wed, 21 May 2025 12:07:31 -0400 Subject: [PATCH] fix: tui: properly calculate quit dialog size This uses the style frame size to calculate the quit dialog width. --- internal/tui/components/dialog/quit.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/tui/components/dialog/quit.go b/internal/tui/components/dialog/quit.go index 0331a9ac5fe433b0a02b39a1f498ce8a28d4bb78..edb67f694f4161c39ae6e9ad471a7eb7e45cd65d 100644 --- a/internal/tui/components/dialog/quit.go +++ b/internal/tui/components/dialog/quit.go @@ -117,11 +117,14 @@ func (q *quitDialogCmp) View() string { ), ) - return baseStyle.Padding(1, 2). + quitDialogStyle := baseStyle. + Padding(1, 2). Border(lipgloss.RoundedBorder()). BorderBackground(t.Background()). - BorderForeground(t.TextMuted()). - Width(lipgloss.Width(content) + 4). + BorderForeground(t.TextMuted()) + + return quitDialogStyle. + Width(lipgloss.Width(content) + quitDialogStyle.GetHorizontalFrameSize()). Render(content) }