align in list
parent
fa210d8e23
commit
3120210931
|
@ -5,6 +5,9 @@
|
|||
package ui
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"git.sr.ht/~rockorager/vaxis"
|
||||
)
|
||||
|
||||
|
@ -39,7 +42,7 @@ func (m *List) Draw(win vaxis.Window) {
|
|||
} else {
|
||||
style = defaultStyle
|
||||
}
|
||||
win.Println(i, vaxis.Segment{Text: subject, Style: style})
|
||||
win.Println(i, vaxis.Segment{Text: fmt.Sprintf(" %-"+strconv.Itoa(win.Width-2)+"s", subject), Style: style})
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue