From 48d597ed967da2ff414b9580f499c6e43e0159d6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Dec 2004 23:27:49 +0000 Subject: [PATCH] last fix resulted in wrongly inheriting bg colour from the parent with m_inheritBgCol == false, fixed the fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index e56b767ca4..21055bce76 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -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) -- 2.45.2