Use border utilities to draw horizontal rule

This commit is contained in:
FIGBERT 2023-03-06 13:28:16 -08:00
parent 572bc357cb
commit 167b4a497b
No known key found for this signature in database
GPG key ID: 67F1598D607A844B

View file

@ -17,7 +17,6 @@
package ui package ui
import ( import (
"strings"
"time" "time"
"go.mau.fi/mauview" "go.mau.fi/mauview"
@ -130,12 +129,7 @@ func (rstr *RosterView) Draw(screen mauview.Screen) {
// second line // second line
widget.WriteLine(screen, mauview.AlignRight, now.Format("Mon, Jan 02"), 0, 2, rstr.width-3, mainStyle) widget.WriteLine(screen, mauview.AlignRight, now.Format("Mon, Jan 02"), 0, 2, rstr.width-3, mainStyle)
// third line // third line
widget.WriteLine( widget.NewBorder().Draw(mauview.NewProxyScreen(screen, 2, 3, rstr.width-5, 1))
screen, mauview.AlignCenter,
strings.Repeat(string(mauview.BoxDrawingsLightHorizontal), rstr.width-5),
2, 3, rstr.width-2,
mainStyle,
)
y := 4 y := 4
for _, room := range rstr.rooms { for _, room := range rstr.rooms {