Skip to content

Commit

Permalink
fix: add padding to timer to remove UI shift
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbunni committed Aug 24, 2022
1 parent 0e29a20 commit fb5ea35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/composable-views/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ func (m mainModel) View() string {
var s string
model := m.currentFocusedModel()
if m.state == timerView {
s += lipgloss.JoinHorizontal(lipgloss.Top, focusedModelStyle.Render(m.timer.View()), modelStyle.Render(m.spinner.View()))
s += lipgloss.JoinHorizontal(lipgloss.Top, focusedModelStyle.Render(fmt.Sprintf("%4s", m.timer.View())), modelStyle.Render( m.spinner.View()))
} else {
s += lipgloss.JoinHorizontal(lipgloss.Top, modelStyle.Render(m.timer.View()), focusedModelStyle.Render(m.spinner.View()))
s += lipgloss.JoinHorizontal(lipgloss.Top, modelStyle.Render(fmt.Sprintf("%4s", m.timer.View())), focusedModelStyle.Render(m.spinner.View()))
}
s += helpStyle.Render(fmt.Sprintf("\ntab: change focused model • n: new %s • q: exit\n", model))
return s
Expand Down

0 comments on commit fb5ea35

Please sign in to comment.