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,11 +255,9 @@ 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)
}
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)
}
}

Loading…
Cancel
Save