fix: tui: properly calculate quit dialog size

Ayman Bagabas created

This uses the style frame size to calculate the quit dialog width.

Change summary

internal/tui/components/dialog/quit.go | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

Detailed changes

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)
 }