]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/settings.cpp
check that the version of __sync_sub_and_fetch that returns a value is supported...
[wxWidgets.git] / src / mac / carbon / settings.cpp
index 237b8f2aeb558f3112af4bd6aa2c182aa813a2f5..03f1f1dcebfbe28c4fb82298e288ff3ce81091f7 100644 (file)
 
 wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
 {
 
 wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
 {
-    int major, minor;
     wxColour resultColor;
     ThemeBrush colorBrushID;
 
     wxColour resultColor;
     ThemeBrush colorBrushID;
 
-    wxGetOsVersion( &major, &minor );
-
     switch ( index )
     {
         case wxSYS_COLOUR_WINDOW:
     switch ( index )
     {
         case wxSYS_COLOUR_WINDOW:
@@ -55,17 +52,11 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
             break ;
 
         case wxSYS_COLOUR_LISTBOX :
             break ;
 
         case wxSYS_COLOUR_LISTBOX :
-            if (major >= 10)
-                resultColor = *wxWHITE ;
-            else
-                resultColor = wxColor( 0xEE, 0xEE, 0xEE );
+            resultColor = *wxWHITE ;
             break ;
 
         case wxSYS_COLOUR_BTNSHADOW:
             break ;
 
         case wxSYS_COLOUR_BTNSHADOW:
-            if (major >= 10)
-                resultColor = wxColor( 0xBE, 0xBE, 0xBE );
-            else
-                resultColor = wxColor( 0x44, 0x44, 0x44 );
+            resultColor = wxColor( 0xBE, 0xBE, 0xBE );
             break ;
 
         case wxSYS_COLOUR_BTNTEXT:
             break ;
 
         case wxSYS_COLOUR_BTNTEXT:
@@ -85,9 +76,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
 #else
                 colorBrushID = kThemeBrushPrimaryHighlightColor;
 #endif
 #else
                 colorBrushID = kThemeBrushPrimaryHighlightColor;
 #endif
-                CGColorRef color ;
-                HIThemeBrushCreateCGColor( colorBrushID, &color );
-                resultColor = wxColor( color );
+                resultColor = wxColor( wxMacCreateCGColorFromHITheme(colorBrushID) );
             }
             break ;
 
             }
             break ;
 
@@ -110,9 +99,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
             resultColor = *wxWHITE ;
 #else
             {
             resultColor = *wxWHITE ;
 #else
             {
-                CGColorRef color ;
-                HIThemeBrushCreateCGColor( kThemeBrushPrimaryHighlightColor, &color );
-                wxColour highlightcolor( color );
+                wxColour highlightcolor( wxMacCreateCGColorFromHITheme(kThemeBrushPrimaryHighlightColor) );
                 if ((highlightcolor.Red() + highlightcolor.Green()  + highlightcolor.Blue() ) == 0)
                     resultColor = *wxWHITE ;
                 else
                 if ((highlightcolor.Red() + highlightcolor.Green()  + highlightcolor.Blue() ) == 0)
                     resultColor = *wxWHITE ;
                 else