Make use of wxStdDialogButtonSizer wherever appropriate.

This makes button spacing more consistent and uses the native button order of the OK/Cancel/... buttons.
(Mostly) fixes issue 4390.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7581 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX 2011-06-03 12:26:32 +00:00
commit 147e67703d
6 changed files with 30 additions and 52 deletions

View file

@ -972,17 +972,11 @@ InputConfigDialog::InputConfigDialog(wxWindow* const parent, InputPlugin& plugin
UpdateDeviceComboBox();
UpdateProfileComboBox();
wxButton* const close_button = new wxButton(this, wxID_OK, _("Save"));
_connect_macro_(close_button, InputConfigDialog::ClickSave, wxEVT_COMMAND_BUTTON_CLICKED, this);
wxButton* const cancel_button = new wxButton(this, wxID_CANCEL, _("Cancel"));
wxSizer* btns = CreateButtonSizer(wxNO_DEFAULT);
btns->Add(cancel_button);
btns->Add(close_button);
Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(InputConfigDialog::ClickSave));
wxBoxSizer* const szr = new wxBoxSizer(wxVERTICAL);
szr->Add(m_pad_notebook, 0, wxEXPAND|wxTOP|wxLEFT|wxRIGHT, 5);
szr->Add(btns, 0, wxEXPAND|wxALL, 5);
szr->Add(CreateButtonSizer(wxOK | wxCANCEL | wxNO_DEFAULT), 0, wxEXPAND|wxALL, 5);
SetSizerAndFit(szr);
Center();