NewBox returns a Box without a border.
()
| 70 | |
| 71 | // NewBox returns a Box without a border. |
| 72 | func NewBox() *Box { |
| 73 | b := &Box{ |
| 74 | width: 15, |
| 75 | height: 10, |
| 76 | innerX: -1, // Mark as uninitialized. |
| 77 | backgroundColor: Styles.PrimitiveBackgroundColor, |
| 78 | borderStyle: tcell.StyleDefault.Foreground(Styles.BorderColor).Background(Styles.PrimitiveBackgroundColor), |
| 79 | titleColor: Styles.TitleColor, |
| 80 | titleAlign: AlignCenter, |
| 81 | } |
| 82 | return b |
| 83 | } |
| 84 | |
| 85 | // SetBorderPadding sets the size of the borders around the box content. |
| 86 | func (b *Box) SetBorderPadding(top, bottom, left, right int) *Box { |
no outgoing calls
no test coverage detected
searching dependent graphs…