From c938a7cc44314e2facf385582190ece474632874 Mon Sep 17 00:00:00 2001 From: Trevor Slocum Date: Tue, 28 Jan 2020 07:13:42 -0800 Subject: [PATCH] Always fill Box background This resolves rendering issues with TextViews which have their background color set to ColorDefault. --- box.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/box.go b/box.go index cc0e160..413b6c2 100644 --- a/box.go +++ b/box.go @@ -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) } }