feat(box): Add `GetBorderPadding`

This commit is contained in:
Andreas Bieber 2020-09-16 13:24:51 +02:00
parent 0974659c81
commit 186ebd7dd6
1 changed files with 7 additions and 0 deletions

7
box.go
View File

@ -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()