diff --git a/include/wx/html/htmlcell.h b/include/wx/html/htmlcell.h
index 328aefce8a..c0d03c8a26 100644
--- a/include/wx/html/htmlcell.h
+++ b/include/wx/html/htmlcell.h
@@ -477,7 +477,7 @@ public:
// sets minimal height of this container.
void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP) {m_MinHeight = h; m_MinHeightAlign = align; m_LastLayout = -1;}
- void SetBackgroundColour(const wxColour& clr) {m_UseBkColour = true; m_BkColour = clr;}
+ void SetBackgroundColour(const wxColour& clr) {m_BkColour = clr;}
// returns background colour (of wxNullColour if none set), so that widgets can
// adapt to it:
wxColour GetBackgroundColour();
@@ -537,7 +537,6 @@ protected:
// alignment horizontal and vertical (left, center, right)
int m_WidthFloat, m_WidthFloatUnits;
// width float is used in adjustWidth
- bool m_UseBkColour;
wxColour m_BkColour;
// background color of this container
int m_Border;
diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp
index 53699fc856..3d243b762f 100644
--- a/src/html/htmlcell.cpp
+++ b/src/html/htmlcell.cpp
@@ -716,7 +716,7 @@ wxHtmlContainerCell::wxHtmlContainerCell(wxHtmlContainerCell *parent) : wxHtmlCe
m_AlignVer = wxHTML_ALIGN_BOTTOM;
m_IndentLeft = m_IndentRight = m_IndentTop = m_IndentBottom = 0;
m_WidthFloat = 100; m_WidthFloatUnits = wxHTML_UNITS_PERCENT;
- m_UseBkColour = false;
+ m_BkColour = wxNullColour;
m_Border = 0;
m_MinHeight = 0;
m_MinHeightAlign = wxHTML_ALIGN_TOP;
@@ -1096,7 +1096,7 @@ void wxHtmlContainerCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
int xlocal = x + m_PosX;
int ylocal = y + m_PosY;
- if (m_UseBkColour)
+ if (m_BkColour.IsOk())
{
wxBrush myb = wxBrush(m_BkColour, wxBRUSHSTYLE_SOLID);
@@ -1217,10 +1217,7 @@ void wxHtmlContainerCell::DrawInvisible(wxDC& dc, int x, int y,
wxColour wxHtmlContainerCell::GetBackgroundColour()
{
- if (m_UseBkColour)
- return m_BkColour;
- else
- return wxNullColour;
+ return m_BkColour;
}