summaryrefslogtreecommitdiff
path: root/internal/tui/modal.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/tui/modal.go')
-rw-r--r--internal/tui/modal.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/tui/modal.go b/internal/tui/modal.go
index b614d04..0e6c517 100644
--- a/internal/tui/modal.go
+++ b/internal/tui/modal.go
@@ -78,7 +78,7 @@ func (m *ModalBoxModel) HandleKeyPress(msg tea.KeyMsg) tea.Cmd {
return cmd
}
-func (m ModalBoxModel) RenderCenteredOver(mainContent string, app AppModel) string {
+func (m ModalBoxModel) RenderCenteredOver(mainContent string, app AppModel, contentWidth int) string {
if !m.Active {
return mainContent
}
@@ -86,12 +86,12 @@ func (m ModalBoxModel) RenderCenteredOver(mainContent string, app AppModel) stri
modalContent := m.Render()
base := lipgloss.NewLayer(mainContent)
- overlayStyle := lipgloss.NewStyle().Border(lipgloss.RoundedBorder()).BorderForeground(lipgloss.Color("62")).Padding(2, 4)
+ overlayStyle := lipgloss.NewStyle().Border(lipgloss.RoundedBorder()).BorderForeground(colorAccent).Padding(2, 4)
overlay := lipgloss.NewLayer(overlayStyle.Render(modalContent))
overlayWidth := overlay.GetWidth()
overlayHeight := overlay.GetHeight()
- overlayLeft := (app.width - overlayWidth) / 2
+ overlayLeft := (contentWidth - overlayWidth) / 2
overlayTop := (app.height - overlayHeight) / 2
canvas := lipgloss.NewCanvas(