]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notebook.cpp
header includes corrected
[wxWidgets.git] / src / msw / notebook.cpp
index e04027b7dad546df6269007a9e6ffe1bf34765db..765866b1912e4aae6010ff2a1bf110e31498f88c 100644 (file)
@@ -966,19 +966,9 @@ void wxNotebook::ApplyThemeBackground(wxWindow*, const wxColour&)
 #endif
 {
 #if wxUSE_UXTHEME
-    // Special case for wxButton: Don't set the background for buttons since
-    // this will switch it into ownerdraw mode
-    if (window->IsKindOf(CLASSINFO(wxButton)) && !window->IsKindOf(CLASSINFO(wxBitmapButton)))
-        // This is essential, otherwise you'll see dark grey
-        // corners in the buttons.
-        ((wxButton*)window)->wxControl::SetBackgroundColour(colour);
-
-    // for all other classes let them decide
-    else if ((window != this) && window->CanApplyParentThemeBackground())
-    {
-        window->SetBackgroundColour(colour);
-    }
 
+    window->ApplyParentThemeBackground(colour);
+    
     for ( wxWindowList::compatibility_iterator node = window->GetChildren().GetFirst(); node; node = node->GetNext() )
     {
         wxWindow *child = node->GetData();