]> git.saurik.com Git - wxWidgets.git/commitdiff
don't inherit the controls colours from the parent - at least for the background...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 20 Feb 2002 00:21:26 +0000 (00:21 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 20 Feb 2002 00:21:26 +0000 (00:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/ctrlcmn.cpp
src/msw/statbox.cpp

index a61beaa16c07f5fe1a1d4251f9b76ce34040b794..2ebabc1f0d715a92784f61936f894d6ba3ba5748 100644 (file)
@@ -92,8 +92,14 @@ bool wxControlBase::CreateControl(wxWindowBase *parent,
 // inherit colour and font settings from the parent window
 void wxControlBase::InheritAttributes()
 {
+    // it definitely doesn't make sense to inherit the background colour as the
+    // controls typically have their own standard one and probably not the
+    // foreground neither?
+#if 0
     SetBackgroundColour(GetParent()->GetBackgroundColour());
     SetForegroundColour(GetParent()->GetForegroundColour());
+#endif // 0
+
     SetFont(GetParent()->GetFont());
 }
 
index a713c99cb5ea89aaa78f5389fedcbf12241cfe7b..fb017bd21924308f7369a5e449248974508dc7d0 100644 (file)
@@ -79,6 +79,9 @@ bool wxStaticBox::Create(wxWindow *parent,
                            WS_EX_TRANSPARENT) )
         return FALSE;
 
+    // to be transparent we should have the same colour as the parent as well
+    SetBackgroundColour(GetParent()->GetBackgroundColour());
+
     return TRUE;
 }