]> git.saurik.com Git - wxWidgets.git/commitdiff
do not inherit background colour in InheritAttributes() as it totally breaks themed...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 19 Dec 2004 19:55:01 +0000 (19:55 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 19 Dec 2004 19:55:01 +0000 (19:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/wincmn.cpp

index 546182a21269cbc4663260a1aeb5d6b62157eb0d..0c2192810bd140fa30c69eccd3b74ce65fd0d185 100644 (file)
@@ -983,8 +983,15 @@ void wxWindowBase::InheritAttributes()
         if ( parent->m_inheritFgCol && !m_hasFgCol )
             SetForegroundColour(parent->GetForegroundColour());
 
         if ( parent->m_inheritFgCol && !m_hasFgCol )
             SetForegroundColour(parent->GetForegroundColour());
 
+        // inheriting (solid) background colour is wrong as it totally breaks
+        // any kind of themed backgrounds
+        //
+        // instead, the controls should use the same background as their parent
+        // (ideally by not drawing it at all)
+#if 0
         if ( parent->m_inheritBgCol && !m_hasBgCol )
             SetBackgroundColour(parent->GetBackgroundColour());
         if ( parent->m_inheritBgCol && !m_hasBgCol )
             SetBackgroundColour(parent->GetBackgroundColour());
+#endif // 0
     }
 }
 
     }
 }