X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/564a150b1f7c63a060c1b205a7cd50035031cd4b..9e152a55785098472ca1c0df110ad0a1203f710f:/src/generic/colrdlgg.cpp diff --git a/src/generic/colrdlgg.cpp b/src/generic/colrdlgg.cpp index 38275f47bb..83cae5f72b 100644 --- a/src/generic/colrdlgg.cpp +++ b/src/generic/colrdlgg.cpp @@ -20,7 +20,7 @@ #pragma hdrstop #endif -#if wxUSE_COLOURDLG +#if wxUSE_COLOURDLG && !defined(__WXGTK20__) #ifndef WX_PRECOMP #include "wx/utils.h" @@ -143,9 +143,8 @@ void wxGenericColourDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) bool wxGenericColourDialog::Create(wxWindow *parent, wxColourData *data) { - if ( !wxDialog::Create(parent, -1, wxT("Colour"), - wxPoint(0, 0), wxSize(900, 900), - wxDEFAULT_DIALOG_STYLE | wxDIALOG_MODAL) ) + if ( !wxDialog::Create(parent, -1, _("Choose colour"), + wxPoint(0, 0), wxSize(900, 900)) ) return FALSE; dialogParent = parent; @@ -313,7 +312,11 @@ void wxGenericColourDialog::InitializeColours(void) for (i = 0; i < WXSIZEOF(customColours); i++) { - customColours[i] = colourData.GetCustomColour(i); + wxColour c = colourData.GetCustomColour(i); + if (c.Ok()) + customColours[i] = colourData.GetCustomColour(i); + else + customColours[i] = wxColour(255, 255, 255); } wxColour curr = colourData.GetColour(); @@ -565,5 +568,5 @@ void wxGenericColourDialog::OnBlueSlider(wxCommandEvent& WXUNUSED(event)) PaintCustomColour(dc); } -#endif // wxUSE_COLOURDLG +#endif // wxUSE_COLOURDLG && !defined(__WXGTK20__)