]> git.saurik.com Git - wxWidgets.git/commitdiff
last fix resulted in wrongly inheriting bg colour from the parent with m_inheritBgCol...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 22 Dec 2004 23:27:49 +0000 (23:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 22 Dec 2004 23:27:49 +0000 (23:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index e56b767ca4746bfe90879ea1d17f83e3f3174aff..21055bce766c8bcb0d7fabb2c5b27fc5e7af5aa8 100644 (file)
@@ -4048,9 +4048,11 @@ WXHBRUSH wxWindowMSW::MSWGetSolidBgBrushForChild(wxWindow *child)
     return 0;
 }
 
-wxColour wxWindowMSW::MSWGetBgColourForChild(wxWindow * WXUNUSED(child))
+wxColour wxWindowMSW::MSWGetBgColourForChild(wxWindow *child)
 {
-    return m_hasBgCol ? GetBackgroundColour() : wxNullColour;
+    return m_inheritBgCol || (m_hasBgCol && child == this)
+                ? GetBackgroundColour()
+                : wxNullColour;
 }
 
 WXHBRUSH wxWindowMSW::MSWGetBgBrushForSelf(wxWindow *parent, WXHDC hDC)