]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/colrdlgg.cpp
CW Win32 and Mac adaptions
[wxWidgets.git] / src / generic / colrdlgg.cpp
index 8444654cca8355dbb14cdc37530c8d77a2198bf2..7f71b2bc75a0416ad7b813eabb3ac661c2a5af57 100644 (file)
 IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog, wxDialog)
 
 BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog)
-       EVT_BUTTON(wxID_ADD_CUSTOM, wxGenericColourDialog::OnAddCustom)
+       EVT_BUTTON(wxID_ADD_CUSTOM, wxGenericColourDialog::OnAddCustom)
        EVT_SLIDER(wxID_RED_SLIDER, wxGenericColourDialog::OnRedSlider)
        EVT_SLIDER(wxID_GREEN_SLIDER, wxGenericColourDialog::OnGreenSlider)
        EVT_SLIDER(wxID_BLUE_SLIDER, wxGenericColourDialog::OnBlueSlider)
        EVT_PAINT(wxGenericColourDialog::OnPaint)
        EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent)
+       EVT_CLOSE(wxGenericColourDialog::OnCloseWindow)
 END_EVENT_TABLE()
 
 #endif
@@ -85,7 +86,7 @@ static wxString wxColourDialogNames[NUM_COLS]={"ORANGE",
                                    "FIREBRICK",
                                    "CORAL",
                                    "FOREST GREEN",
-                                   "AQUARAMINE",
+                                   "AQUAMARINE",
                                    "BLUE",
                                    "NAVY",
                                    "THISTLE",
@@ -129,10 +130,9 @@ wxGenericColourDialog::~wxGenericColourDialog(void)
 {
 }
 
-bool wxGenericColourDialog::OnClose(void)
+void wxGenericColourDialog::OnCloseWindow(wxCloseEvent& event)
 {
-  Show(FALSE);
-  return FALSE;
+  EndModal(wxID_CANCEL);
 }
 
 bool wxGenericColourDialog::Create(wxWindow *parent, wxColourData *data)
@@ -228,11 +228,11 @@ void wxGenericColourDialog::CreateWidgets(void)
 {
   wxBeginBusyCursor();
   
-  wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(okButtonX, buttonY));
+  wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(okButtonX, buttonY), wxSize(75,-1) );
   int bw, bh;
   okButton->GetSize(&bw, &bh);
 
-  (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(okButtonX + bw + 20, buttonY));
+  (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(okButtonX + bw + 20, buttonY), wxSize(75,-1));
   (void) new wxButton(this, wxID_ADD_CUSTOM, _("Add to custom colours"),
      wxPoint(customButtonX, buttonY));