fix(border): both GetHorizontalBorderSize and GetVerticalBorderSize (#225)

This commit is contained in:
nervo 2023-10-05 17:48:38 +02:00 committed by GitHub
parent 2d2a577e2d
commit b0eb95dbc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
get.go
View File

@ -340,16 +340,14 @@ func (s Style) GetBorderRightSize() int {
// borders contain runes of varying widths, the widest rune is returned. If no
// border exists on the horizontal edges, 0 is returned.
func (s Style) GetHorizontalBorderSize() int {
b := s.getBorderStyle()
return b.GetLeftSize() + b.GetRightSize()
return s.GetBorderLeftSize() + s.GetBorderRightSize()
}
// GetVerticalBorderSize returns the width of the vertical borders. If
// borders contain runes of varying widths, the widest rune is returned. If no
// border exists on the vertical edges, 0 is returned.
func (s Style) GetVerticalBorderSize() int {
b := s.getBorderStyle()
return b.GetTopSize() + b.GetBottomSize()
return s.GetBorderTopSize() + s.GetBorderBottomSize()
}
// GetInline returns the style's inline setting. If no value is set false is