Set the separator styles to that of the block

This commit is contained in:
Ryan Lewis 2019-02-01 17:22:43 +00:00
parent bbe260b1c3
commit d1c58b4ba9

View File

@ -85,7 +85,7 @@ func (self *Table) Draw(buf *Buffer) {
// draw vertical separators // draw vertical separators
separatorXCoordinate := self.Inner.Min.X separatorXCoordinate := self.Inner.Min.X
verticalCell := NewCell(VERTICAL_LINE, NewStyle(ColorWhite)) verticalCell := NewCell(VERTICAL_LINE, self.Block.BorderStyle)
for _, width := range columnWidths { for _, width := range columnWidths {
separatorXCoordinate += width separatorXCoordinate += width
buf.SetCell(verticalCell, image.Pt(separatorXCoordinate, yCoordinate)) buf.SetCell(verticalCell, image.Pt(separatorXCoordinate, yCoordinate))
@ -95,7 +95,7 @@ func (self *Table) Draw(buf *Buffer) {
yCoordinate++ yCoordinate++
// draw horizontal separator // draw horizontal separator
horizontalCell := NewCell(HORIZONTAL_LINE, NewStyle(ColorWhite)) horizontalCell := NewCell(HORIZONTAL_LINE, self.Block.BorderStyle)
if self.RowSeparator && yCoordinate < self.Inner.Max.Y && i != len(self.Rows)-1 { if self.RowSeparator && yCoordinate < self.Inner.Max.Y && i != len(self.Rows)-1 {
buf.Fill(horizontalCell, image.Rect(self.Inner.Min.X, yCoordinate, self.Inner.Max.X, yCoordinate+1)) buf.Fill(horizontalCell, image.Rect(self.Inner.Min.X, yCoordinate, self.Inner.Max.X, yCoordinate+1))
yCoordinate++ yCoordinate++