added centering for hourlyView
This commit is contained in:
parent
2476af323f
commit
5ebc5d2eee
1 changed files with 9 additions and 1 deletions
10
tui/view.go
10
tui/view.go
|
|
@ -136,6 +136,14 @@ func (m model) viewHourly() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
b.WriteString("[n] to add event,[e] to edit event,[x] to delete an event, [up]/[down] keys to move, [Esc] to go back to month view, [q] to quit.")
|
b.WriteString("[n] to add event,[e] to edit event,[x] to delete an event, [up]/[down] keys to move, [Esc] to go back to month view, [q] to quit.")
|
||||||
return b.String()
|
// Center the hourly view
|
||||||
|
view := b.String()
|
||||||
|
|
||||||
|
// Horizontal centering
|
||||||
|
view = lipgloss.PlaceHorizontal(m.width, lipgloss.Center, view)
|
||||||
|
// Vertical centering
|
||||||
|
view = lipgloss.PlaceVertical(m.height, lipgloss.Center, view)
|
||||||
|
|
||||||
|
return view
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue