X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/276ee5334d28762520abad9653d51f8e81812ebc..7f65743f005572f1de2754ba8c5e7cf1eed1847e:/src/mac/carbon/settings.cpp diff --git a/src/mac/carbon/settings.cpp b/src/mac/carbon/settings.cpp index 237b8f2aeb..58cecfb357 100644 --- a/src/mac/carbon/settings.cpp +++ b/src/mac/carbon/settings.cpp @@ -30,12 +30,9 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index) { - int major, minor; wxColour resultColor; ThemeBrush colorBrushID; - wxGetOsVersion( &major, &minor ); - switch ( index ) { case wxSYS_COLOUR_WINDOW: @@ -55,17 +52,11 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index) break ; case wxSYS_COLOUR_LISTBOX : - if (major >= 10) - resultColor = *wxWHITE ; - else - resultColor = wxColor( 0xEE, 0xEE, 0xEE ); + resultColor = *wxWHITE ; 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: @@ -85,9 +76,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index) #else colorBrushID = kThemeBrushPrimaryHighlightColor; #endif - CGColorRef color ; - HIThemeBrushCreateCGColor( colorBrushID, &color ); - resultColor = wxColor( color ); + resultColor = wxColor( wxMacCreateCGColorFromHITheme(colorBrushID) ); } break ; @@ -110,9 +99,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index) 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 @@ -122,7 +109,9 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index) break ; case wxSYS_COLOUR_INFOBK : - resultColor = *wxWHITE ; + // we don't have a way to detect tooltip color, so use the + // standard value used at least on 10.4: + resultColor = wxColour( 0xFF, 0xFF, 0xD3 ) ; break ; case wxSYS_COLOUR_APPWORKSPACE: resultColor = wxColor( 0x80, 0x80, 0x80 ); ;