Skip to content

Commit 9917de9

Browse files
committed
Add padding to tview box
1 parent 088e4f2 commit 9917de9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/posts/post.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ func openPost(app *tview.Application, postcuid string, list *tview.List) {
4545
"\n",
4646
singlePost.Post.ContentMarkdown,
4747
)
48+
textView.Box = textView.Box.SetBorder(true).SetBorderPadding(1, 1, 2, 1)
49+
textView.SetBorder(true)
4850

4951
textView.SetDoneFunc(func(key tcell.Key) {
5052
if key == tcell.KeyEscape {
@@ -54,7 +56,7 @@ func openPost(app *tview.Application, postcuid string, list *tview.List) {
5456
}
5557
}
5658
})
57-
textView.SetBorder(true)
59+
5860
if err := app.SetRoot(textView, true).SetFocus(textView).Run(); err != nil {
5961
app.Stop()
6062
panic(err)

0 commit comments

Comments
 (0)