Always fill Box background

This resolves rendering issues with TextViews which have their background
color set to ColorDefault.
pull/395/head
Trevor Slocum 4 years ago
parent e8d1520774
commit c938a7cc44

@ -255,13 +255,11 @@ func (b *Box) Draw(screen tcell.Screen) {
// Fill background.
background := def.Background(b.backgroundColor)
if b.backgroundColor != tcell.ColorDefault {
for y := b.y; y < b.y+b.height; y++ {
for x := b.x; x < b.x+b.width; x++ {
screen.SetContent(x, y, ' ', nil, background)
}
}
}
// Draw border.
if b.border && b.width >= 2 && b.height >= 2 {

Loading…
Cancel
Save