X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ea1c917764fb2588fe1aadc75c49ba300f8cb2f..ffbf7f6634ebdce1055ec21256c4fd3e3bd410c8:/src/mac/carbon/colordlg.cpp diff --git a/src/mac/carbon/colordlg.cpp b/src/mac/carbon/colordlg.cpp index 4109e33488..377276d0c4 100644 --- a/src/mac/carbon/colordlg.cpp +++ b/src/mac/carbon/colordlg.cpp @@ -21,9 +21,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog) #include "wx/mac/private.h" -#ifndef __DARWIN__ -#include -#endif /* * wxColourDialog @@ -50,9 +47,9 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) int wxColourDialog::ShowModal() { - RGBColor currentColor = *((RGBColor*)m_colourData.m_dataColour.GetPixel()) ; - -#if TARGET_API_MAC_OSX + RGBColor currentColor ; + + m_colourData.m_dataColour.GetRGBColor( currentColor ); NColorPickerInfo info; OSStatus err ; memset(&info, 0, sizeof(info)) ; @@ -68,21 +65,10 @@ int wxColourDialog::ShowModal() currentColor.red = info.theColor.color.rgb.red ; currentColor.green = info.theColor.color.rgb.green ; currentColor.blue = info.theColor.color.rgb.blue ; - m_colourData.m_dataColour.Set((WXCOLORREF*) ¤tColor); - return wxID_OK; - } -#else - RGBColor newColor ; - Point where ; + m_colourData.m_dataColour = currentColor; - where.h = where.v = -1; - - if (GetColor( where, "\pSelect a new palette color.", ¤tColor, &newColor )) - { - m_colourData.m_dataColour.Set( (WXCOLORREF*) &newColor ) ; return wxID_OK; } -#endif return wxID_CANCEL; }