summaryrefslogtreecommitdiffstats
path: root/widgets/help.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/help.go')
-rw-r--r--widgets/help.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/widgets/help.go b/widgets/help.go
index 9f78dd0..8aab35d 100644
--- a/widgets/help.go
+++ b/widgets/help.go
@@ -54,6 +54,11 @@ func NewHelpMenu() *HelpMenu {
func (self *HelpMenu) Resize(termWidth, termHeight int) {
textWidth := 53
+ for _, line := range strings.Split(KEYBINDS, "\n") {
+ if textWidth < len(line) {
+ textWidth = len(line) + 2
+ }
+ }
textHeight := strings.Count(KEYBINDS, "\n") + 1
x := (termWidth - textWidth) / 2
y := (termHeight - textHeight) / 2
@@ -67,7 +72,7 @@ func (self *HelpMenu) Draw(buf *ui.Buffer) {
for y, line := range strings.Split(KEYBINDS, "\n") {
for x, rune := range line {
buf.SetCell(
- ui.NewCell(rune, ui.NewStyle(7)),
+ ui.NewCell(rune, ui.Theme.Default),
image.Pt(self.Inner.Min.X+x, self.Inner.Min.Y+y-1),
)
}