]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/colrdlgg.cpp
Added test for long long type. (Really trivial, see setup.h: SIZEOF_xxx)
[wxWidgets.git] / src / generic / colrdlgg.cpp
index 4e011463abd3583ee5ffc0553a2968e30df57ec3..192fbbcddbb517b9cc915d72a721bc3622bcaf82 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)
@@ -232,7 +232,7 @@ void wxGenericColourDialog::CreateWidgets(void)
   int bw, bh;
   okButton->GetSize(&bw, &bh);
 
-  (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(okButtonX + bw + 10, buttonY));
+  (void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(okButtonX + bw + 20, buttonY));
   (void) new wxButton(this, wxID_ADD_CUSTOM, _("Add to custom colours"),
      wxPoint(customButtonX, buttonY));
 
@@ -252,7 +252,7 @@ void wxGenericColourDialog::CreateWidgets(void)
   blueSlider = new wxSlider(this, wxID_BLUE_SLIDER, 0, 0, 255,
    wxPoint(sliderX + 2*sliderSpacing, 10), wxSize(-1, sliderHeight), wxVERTICAL|wxSL_LABELS);
 
-  SetClientSize(sliderX + 3*sliderSpacing, buttonY + 30);
+  SetClientSize(sliderX + 3*sliderSpacing, buttonY + 40);
   okButton->SetDefault();
 
   Centre(wxBOTH);