Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Commit c891295

Browse files
aymanbagabaskujtimiihoxha
authored andcommitted
fix: tui: properly calculate quit dialog size
This uses the style frame size to calculate the quit dialog width.
1 parent b364394 commit c891295

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

  • internal/tui/components/dialog

internal/tui/components/dialog/quit.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,14 @@ func (q *quitDialogCmp) View() string {
117117
),
118118
)
119119

120-
return baseStyle.Padding(1, 2).
120+
quitDialogStyle := baseStyle.
121+
Padding(1, 2).
121122
Border(lipgloss.RoundedBorder()).
122123
BorderBackground(t.Background()).
123-
BorderForeground(t.TextMuted()).
124-
Width(lipgloss.Width(content) + 4).
124+
BorderForeground(t.TextMuted())
125+
126+
return quitDialogStyle.
127+
Width(lipgloss.Width(content) + quitDialogStyle.GetHorizontalFrameSize()).
125128
Render(content)
126129
}
127130

0 commit comments

Comments
 (0)