fixed size calculation in BorderView

This commit is contained in:
milarin 2023-04-24 13:03:16 +02:00
parent 109e2a9efd
commit a9f9a2e38d

View File

@ -101,9 +101,9 @@ func (v *BorderView) Layout() (prefWidth, prefHeight int) {
for side, border := range v.ShowBorder { for side, border := range v.ShowBorder {
if border { if border {
if side.Horizontal() { if side.Horizontal() && w >= 0 {
w++ w++
} else if side.Vertical() { } else if side.Vertical() && h >= 0 {
h++ h++
} }
} }