Browse Source

feat(box): Add `GetBorderPadding`

tablepad
Andreas Bieber 2 years ago
parent
commit
186ebd7dd6
  1. 7
      box.go

7
box.go

@ -86,6 +86,13 @@ func NewBox() *Box {
return b
}
// GetBorderPadding returns the size of the borders around the box content.
func (b *Box) GetBorderPadding() (top, bottom, left, right int) {
b.l.RLock()
defer b.l.RUnlock()
return b.paddingTop, b.paddingBottom, b.paddingLeft, b.paddingRight
}
// SetBorderPadding sets the size of the borders around the box content.
func (b *Box) SetBorderPadding(top, bottom, left, right int) *Box {
b.l.Lock()

Loading…
Cancel
Save