]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/colrdlgg.cpp
Fix toggling the header in the generic wxListCtrl.
[wxWidgets.git] / src / generic / colrdlgg.cpp
index ec97500ac8cd9942828e1278995df74e6edd61c0..03c93c5e8bb3465b0c6f230affd2d4a3441a834b 100644 (file)
@@ -16,7 +16,7 @@
     #pragma hdrstop
 #endif
 
-#if wxUSE_COLOURDLG && (!defined(__WXGTK20__) || defined(__WXUNIVERSAL__))
+#if wxUSE_COLOURDLG
 
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
@@ -58,7 +58,7 @@ END_EVENT_TABLE()
 
 // don't change the number of elements (48) in this array, the code below is
 // hardcoded to use it
-static const wxChar *wxColourDialogNames[] =
+static const wxChar *const wxColourDialogNames[] =
 {
     wxT("ORANGE"),
     wxT("GOLDENROD"),
@@ -140,8 +140,9 @@ void wxGenericColourDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
 
 bool wxGenericColourDialog::Create(wxWindow *parent, wxColourData *data)
 {
-    if ( !wxDialog::Create(parent, wxID_ANY, _("Choose colour"),
-                           wxPoint(0,0), wxSize(900, 900)) )
+    if ( !wxDialog::Create(GetParentForModalDialog(parent), wxID_ANY,
+                           _("Choose colour"),
+                           wxPoint(0, 0), wxSize(900, 900)) )
         return false;
 
     if (data)
@@ -200,7 +201,7 @@ void wxGenericColourDialog::OnMouseEvent(wxMouseEvent& event)
 
 void wxGenericColourDialog::OnPaint(wxPaintEvent& event)
 {
-#if !defined(__WXMOTIF__) && !defined(__WXPM__) && !defined(__WXCOCOA__)
+#if !defined(__WXMOTIF__) && !defined(__WXPM__) && !defined(__WXCOCOA__) && !defined(__WXOSX__)
     wxDialog::OnPaint(event);
 #else
     wxUnusedVar(event);
@@ -379,7 +380,7 @@ void wxGenericColourDialog::PaintBasicColours(wxDC& dc)
             int y = (i*(m_smallRectangleSize.y+m_gridSpacing) + m_standardColoursRect.y);
 
             dc.SetPen(*wxBLACK_PEN);
-            wxBrush brush(m_standardColours[ptr], wxSOLID);
+            wxBrush brush(m_standardColours[ptr]);
             dc.SetBrush(brush);
 
             dc.DrawRectangle( x, y, m_smallRectangleSize.x, m_smallRectangleSize.y);
@@ -402,7 +403,7 @@ void wxGenericColourDialog::PaintCustomColours(wxDC& dc)
 
       dc.SetPen(*wxBLACK_PEN);
 
-      wxBrush brush(m_customColours[ptr], wxSOLID);
+      wxBrush brush(m_customColours[ptr]);
       dc.SetBrush(brush);
 
       dc.DrawRectangle( x, y, m_smallRectangleSize.x, m_smallRectangleSize.y);
@@ -460,7 +461,7 @@ void wxGenericColourDialog::PaintCustomColour(wxDC& dc)
 {
     dc.SetPen(*wxBLACK_PEN);
 
-    wxBrush *brush = new wxBrush(m_colourData.m_dataColour, wxSOLID);
+    wxBrush *brush = new wxBrush(m_colourData.m_dataColour);
     dc.SetBrush(*brush);
 
     dc.DrawRectangle( m_singleCustomColourRect.x, m_singleCustomColourRect.y,
@@ -580,4 +581,4 @@ void wxGenericColourDialog::OnBlueSlider(wxCommandEvent& WXUNUSED(event))
 
 #endif // wxUSE_SLIDER
 
-#endif // wxUSE_COLOURDLG && !defined(__WXGTK20__)
+#endif // wxUSE_COLOURDLG