mirror of https://github.com/odrling/Aegisub
Started adding non-functional help buttons to dialogs and replacing buttons with wxStdDialogButtonSizer.
Originally committed to SVN as r1297.
This commit is contained in:
parent
d5a42097ff
commit
b28eeabc47
|
@ -316,20 +316,14 @@ DialogStyleEditor::DialogStyleEditor (wxWindow *parent, AssStyle *_style, Subtit
|
|||
|
||||
|
||||
// Buttons
|
||||
wxSizer *ButtonSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
ButtonSizer->AddStretchSpacer(1);
|
||||
wxStdDialogButtonSizer *ButtonSizer = new wxStdDialogButtonSizer();
|
||||
wxButton *okButton = new wxButton(this, wxID_OK);
|
||||
#ifndef __WXMAC__
|
||||
ButtonSizer->Add(okButton,0,wxRIGHT,5);
|
||||
ButtonSizer->Add(new wxButton(this, wxID_CANCEL),0,wxRIGHT,5);
|
||||
ButtonSizer->Add(new wxButton(this, wxID_APPLY),0,wxRIGHT,5);
|
||||
#else
|
||||
ButtonSizer->Add(new wxButton(this, wxID_APPLY),0,wxRIGHT,5);
|
||||
ButtonSizer->Add(new wxButton(this, wxID_CANCEL),0,wxRIGHT,5);
|
||||
ButtonSizer->Add(okButton,0,wxRIGHT,5);
|
||||
#endif
|
||||
okButton->SetDefault();
|
||||
|
||||
ButtonSizer->AddButton(new wxButton(this, wxID_APPLY));
|
||||
ButtonSizer->AddButton(new wxButton(this, wxID_CANCEL));
|
||||
ButtonSizer->AddButton(new wxButton(this, wxID_HELP));
|
||||
ButtonSizer->AddButton(okButton);
|
||||
ButtonSizer->Realize();
|
||||
|
||||
// Left side sizer
|
||||
wxSizer *LeftSizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
@ -352,7 +346,7 @@ DialogStyleEditor::DialogStyleEditor (wxWindow *parent, AssStyle *_style, Subtit
|
|||
// General Layout
|
||||
MainSizer = new wxBoxSizer(wxVERTICAL);
|
||||
MainSizer->Add(ControlSizer,1,wxALL | wxALIGN_CENTER | wxEXPAND,5);
|
||||
MainSizer->Add(ButtonSizer,0,wxBOTTOM | wxALIGN_CENTER | wxEXPAND,5);
|
||||
MainSizer->Add(ButtonSizer,0,wxBOTTOM | wxEXPAND,5);
|
||||
|
||||
// Set sizer
|
||||
MainSizer->SetSizeHints(this);
|
||||
|
|
|
@ -133,15 +133,20 @@ DialogStyleManager::DialogStyleManager (wxWindow *parent,SubtitlesGrid *_grid)
|
|||
CurrentCopy->Disable();
|
||||
CurrentDelete->Disable();
|
||||
|
||||
// Buttons
|
||||
wxStdDialogButtonSizer *buttonSizer = new wxStdDialogButtonSizer();
|
||||
buttonSizer->AddButton(new wxButton(this,wxID_HELP));
|
||||
buttonSizer->SetCancelButton(new wxButton(this, wxID_CLOSE));
|
||||
buttonSizer->Realize();
|
||||
|
||||
// General layout
|
||||
wxSizer *StylesSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
StylesSizer->Add(StorageBox,0,wxRIGHT | wxEXPAND,5);
|
||||
StylesSizer->Add(CurrentBox,0,wxLEFT | wxEXPAND,0);
|
||||
wxButton *CloseButton = new wxButton(this, wxID_CLOSE, _T(""), wxDefaultPosition, wxSize(100,25));
|
||||
MainSizer = new wxBoxSizer(wxVERTICAL);
|
||||
MainSizer->Add(CatalogBox,0,wxEXPAND | wxLEFT | wxRIGHT | wxTOP,5);
|
||||
MainSizer->Add(StylesSizer,0,wxEXPAND | wxALL,5);
|
||||
MainSizer->Add(CloseButton,0,wxBOTTOM | wxALIGN_CENTER,5);
|
||||
MainSizer->Add(StylesSizer,1,wxEXPAND | wxALL,5);
|
||||
MainSizer->Add(buttonSizer,0,wxBOTTOM | wxEXPAND,5);
|
||||
|
||||
// Set sizer
|
||||
SetSizer(MainSizer);
|
||||
|
|
Loading…
Reference in New Issue