]> git.saurik.com Git - wxWidgets.git/commitdiff
use HasTransparentBackground() to correctly draw the background of static text/box...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 7 Jan 2005 16:59:48 +0000 (16:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 7 Jan 2005 16:59:48 +0000 (16:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index a3a82351a42b8d739dd38ce72bfdc8ddadf3dd7a..9f2ee69c58522dc0ff44b39c2e8919b0dbff5a8f 100644 (file)
@@ -4138,9 +4138,17 @@ WXHBRUSH wxWindowMSW::MSWGetSolidBgBrushForChild(wxWindow *child)
 
 wxColour wxWindowMSW::MSWGetBgColourForChild(wxWindow *child)
 {
-    return m_inheritBgCol || (m_hasBgCol && child == this)
-                ? GetBackgroundColour()
-                : wxNullColour;
+    if ( m_hasBgCol )
+    {
+        if ( m_inheritBgCol ||
+                child == this ||
+                    child->HasTransparentBackground() )
+        {
+            return GetBackgroundColour();
+        }
+    }
+
+    return wxNullColour;
 }
 
 WXHBRUSH wxWindowMSW::MSWGetBgBrushForSelf(wxWindow *parent, WXHDC hDC)