fixes fo inheriting colours set with SetOwnBackround()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2004-12-22 21:09:01 +00:00
parent dd12ce22d8
commit b55ff31e20

View File

@ -4050,7 +4050,7 @@ WXHBRUSH wxWindowMSW::MSWGetSolidBgBrushForChild(wxWindow *child)
wxColour wxWindowMSW::MSWGetBgColourForChild(wxWindow * WXUNUSED(child)) wxColour wxWindowMSW::MSWGetBgColourForChild(wxWindow * WXUNUSED(child))
{ {
return m_inheritBgCol ? GetBackgroundColour() : wxNullColour; return m_hasBgCol ? GetBackgroundColour() : wxNullColour;
} }
WXHBRUSH wxWindowMSW::MSWGetBgBrushForSelf(wxWindow *parent, WXHDC hDC) WXHBRUSH wxWindowMSW::MSWGetBgBrushForSelf(wxWindow *parent, WXHDC hDC)
@ -4067,8 +4067,11 @@ WXHBRUSH wxWindowMSW::MSWGetBgBrush(WXHDC hDC)
return hBrush; return hBrush;
// background is not inherited beyond the windows which have their own // background is not inherited beyond the windows which have their own
// fixed background such as top level windows and notebooks // fixed background such as top level windows and notebooks and for
if ( win->ProvidesBackground() ) // windows for which a custom colour had been explicitly set with
// SetOwnBackgroundColour() and so shouldn't affect its children
if ( win->ProvidesBackground() ||
(win->m_hasBgCol && !win->m_inheritBgCol) )
break; break;
} }