]> git.saurik.com Git - wxWidgets.git/commitdiff
use parent background and not ours unless one was explicitly set when manually drawin...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 16 Jul 2008 01:30:32 +0000 (01:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 16 Jul 2008 01:30:32 +0000 (01:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/statbmp.cpp

index d504aeb2c6c958378e3c918394832bfdb19e084c..c362c714f604382fbaf278fff4e262e439359861 100644 (file)
@@ -256,8 +256,11 @@ void wxStaticBitmap::DoPaintManually(wxPaintEvent& WXUNUSED(event))
     const wxSize size(GetSize());
     const wxBitmap bmp(GetBitmap());
 
-    // Clear the background
-    dc.SetBrush(GetBackgroundColour());
+    // Clear the background: notice that we're supposed to be transparent, so
+    // use the parent background colour if we don't have our own instead of
+    // falling back to the default
+    const wxWindow *win = UseBgCol() ? this : GetParent();
+    dc.SetBrush(win->GetBackgroundColour());
     dc.SetPen(*wxTRANSPARENT_PEN);
     dc.DrawRectangle(0, 0, size.GetWidth(), size.GetHeight());