Rounded Corners (#1653)

* add option to draw outer corners rounded

* gofmt

---------

Co-authored-by: Gökçehan Kara <gokcehankara@gmail.com>
This commit is contained in:
J-KappesandGökçehan Kara authored and GitHub committed 2024-04-07 15:36:54 +02:00
1 parent f507b618c9
commit 647fa469fb
6 files changed
+29 -4

No files matched your search

+11 -4
View File
@@ -980,10 +980,17 @@ func (ui *ui) drawBox() {
ui.screen.SetContent(w-1, i, tcell.RuneVLine, nil, st)
}
ui.screen.SetContent(0, 1, tcell.RuneULCorner, nil, st)
ui.screen.SetContent(w-1, 1, tcell.RuneURCorner, nil, st)
ui.screen.SetContent(0, h-2, tcell.RuneLLCorner, nil, st)
ui.screen.SetContent(w-1, h-2, tcell.RuneLRCorner, nil, st)
if gOpts.roundbox {
ui.screen.SetContent(0, 1, '╭', nil, st)
ui.screen.SetContent(w-1, 1, '╮', nil, st)
ui.screen.SetContent(0, h-2, '╰', nil, st)
ui.screen.SetContent(w-1, h-2, '╯', nil, st)
} else {
ui.screen.SetContent(0, 1, tcell.RuneULCorner, nil, st)
ui.screen.SetContent(w-1, 1, tcell.RuneURCorner, nil, st)
ui.screen.SetContent(0, h-2, tcell.RuneLLCorner, nil, st)
ui.screen.SetContent(w-1, h-2, tcell.RuneLRCorner, nil, st)
}
wacc := 0
for wind := 0; wind < len(ui.wins)-1; wind++ {