]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/drawer.cpp
Added automatic dialog scrolling ability
[wxWidgets.git] / src / mac / carbon / drawer.cpp
index 0e77b2870220e4fb8a1d04cb5eb6b71da90138cb..2c02dd42601c54db84d1f35a3d0e5b11a2d89027 100644 (file)
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#pragma implementation "control.h"
-#endif
+#include "wx/wxprec.h"
 
-#include "wx/defs.h"
 #include "wx/mac/private.h"
 
-#if defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
+#if defined( __WXMAC__ )
 
 #include "wx/mac/carbon/drawer.h"
 
@@ -82,9 +79,8 @@ bool wxDrawerWindow::Create(wxWindow *parent,
     if (success)
     {
         // Use drawer brush.
-        m_macBackgroundBrush.MacSetTheme(kThemeBrushDrawerBackground);
-        ::SetThemeWindowBackground((WindowRef)m_macWindow,
-         m_macBackgroundBrush.MacGetTheme(), false);
+        SetBackgroundColour( wxColour( wxMacCreateCGColorFromHITheme( kThemeBrushDrawerBackground ) ) );
+        ::SetThemeWindowBackground((WindowRef)m_macWindow, kThemeBrushDrawerBackground, false);
          
         // Leading and trailing offset are gaps from parent window edges
         // to where the drawer starts.
@@ -200,5 +196,4 @@ wxDirection WindowEdgeToDirection(OptionBits edge)
     return direction;
 }
 
-#endif // defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
-
+#endif // defined( __WXMAC__ )