mirror of https://github.com/odrling/Aegisub
Vertically center various widgets
Preferences: labels. Properties dialog: resolution textboxes. Fonts collector: path textbox. Resample resolution: resolution spin boxes. Video details: labels. Originally committed to SVN as r6804.
This commit is contained in:
parent
b8f7d5eb13
commit
8960e840d2
|
@ -239,7 +239,7 @@ DialogFontsCollector::DialogFontsCollector(agi::Context *c)
|
|||
dest_browse_button = new wxButton(destination_box->GetStaticBox(), -1, _("&Browse..."));
|
||||
|
||||
wxSizer *dest_browse_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
dest_browse_sizer->Add(dest_ctrl, wxSizerFlags(1).Border(wxRIGHT));
|
||||
dest_browse_sizer->Add(dest_ctrl, wxSizerFlags(1).Border(wxRIGHT).Align(wxALIGN_CENTER_VERTICAL));
|
||||
dest_browse_sizer->Add(dest_browse_button, wxSizerFlags());
|
||||
|
||||
destination_box->Add(dest_label, wxSizerFlags().Border(wxBOTTOM));
|
||||
|
|
|
@ -88,9 +88,9 @@ DialogProperties::DialogProperties(agi::Context *c)
|
|||
else
|
||||
FromVideo->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogProperties::OnSetFromVideo, this);
|
||||
|
||||
ResSizer->Add(ResX,1,wxRIGHT,5);
|
||||
ResSizer->Add(ResX,1,wxRIGHT | wxALIGN_CENTER_VERTICAL,5);
|
||||
ResSizer->Add(ResText,0,wxALIGN_CENTER | wxRIGHT,5);
|
||||
ResSizer->Add(ResY,1,wxRIGHT,5);
|
||||
ResSizer->Add(ResY,1,wxRIGHT | wxALIGN_CENTER_VERTICAL,5);
|
||||
ResSizer->Add(FromVideo,1,0,0);
|
||||
|
||||
// Options
|
||||
|
|
|
@ -100,9 +100,9 @@ DialogResample::DialogResample(agi::Context *c, ResampleSettings &settings)
|
|||
margin_box->Add(margin_sizer, wxSizerFlags(1).Expand().Border(wxBOTTOM));
|
||||
|
||||
wxSizer *res_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
res_sizer->Add(res_x, wxSizerFlags(1).Border(wxRIGHT));
|
||||
res_sizer->Add(res_x, wxSizerFlags(1).Border(wxRIGHT).Align(wxALIGN_CENTER_VERTICAL));
|
||||
res_sizer->Add(new wxStaticText(this, -1, _("x")), wxSizerFlags().Center().Border(wxRIGHT));
|
||||
res_sizer->Add(res_y, wxSizerFlags(1).Border(wxRIGHT));
|
||||
res_sizer->Add(res_y, wxSizerFlags(1).Border(wxRIGHT).Align(wxALIGN_CENTER_VERTICAL));
|
||||
res_sizer->Add(from_video, wxSizerFlags(1));
|
||||
|
||||
wxSizer *res_box = new wxStaticBoxSizer(wxVERTICAL, this, _("Resolution"));
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include "video_provider_manager.h"
|
||||
|
||||
static void make_field(wxWindow *parent, wxSizer *sizer, wxString const& name, wxString const& value) {
|
||||
sizer->Add(new wxStaticText(parent, -1, name), 0, wxALIGN_CENTRE_VERTICAL | wxEXPAND);
|
||||
sizer->Add(new wxStaticText(parent, -1, name), 0, wxALIGN_CENTRE_VERTICAL);
|
||||
sizer->Add(new wxTextCtrl(parent, -1, value, wxDefaultPosition, wxSize(300,-1), wxTE_READONLY), 0, wxALIGN_CENTRE_VERTICAL | wxEXPAND);
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ OptionPage::OptionPage(wxTreebook *book, Preferences *parent, wxString name, int
|
|||
|
||||
template<class T>
|
||||
void OptionPage::Add(wxSizer *sizer, wxString const& label, T *control) {
|
||||
sizer->Add(new wxStaticText(this, -1, label), 1, wxEXPAND | wxALIGN_CENTRE_VERTICAL);
|
||||
sizer->Add(new wxStaticText(this, -1, label), 1, wxALIGN_CENTRE_VERTICAL);
|
||||
sizer->Add(control, wxSizerFlags().Expand());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue