mirror of
https://github.com/sst/opencode.git
synced 2025-08-04 21:38:01 +00:00
fix(tui): cleanup modal visuals
This commit is contained in:
parent
3ea2daaa4c
commit
dc1947838c
4 changed files with 97 additions and 192 deletions
|
@ -103,13 +103,13 @@ func (m *Modal) Render(contentView string, background string) string {
|
|||
Bold(true).
|
||||
Padding(0, 1)
|
||||
|
||||
escStyle := baseStyle.Foreground(t.TextMuted()).Bold(false)
|
||||
escStyle := baseStyle.Foreground(t.TextMuted())
|
||||
escText := escStyle.Render("esc")
|
||||
|
||||
// Calculate position for esc text
|
||||
titleWidth := lipgloss.Width(m.title)
|
||||
escWidth := lipgloss.Width(escText)
|
||||
spacesNeeded := max(0, innerWidth-titleWidth-escWidth-3)
|
||||
spacesNeeded := max(0, innerWidth-titleWidth-escWidth-2)
|
||||
spacer := strings.Repeat(" ", spacesNeeded)
|
||||
titleLine := m.title + spacer + escText
|
||||
titleLine = titleStyle.Render(titleLine)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue