mirror of https://github.com/odrling/Aegisub
Fix remaining static box sizer problems (hopefully) and also fix a few other, minor dialogue layout problems.
Originally committed to SVN as r1590.
This commit is contained in:
parent
3fd97b551f
commit
0dd60ed25a
|
@ -65,14 +65,19 @@ void AssExporter::DrawSettings(wxWindow *parent,wxSizer *AddTo) {
|
||||||
FilterList::iterator begin = AssExportFilterChain::GetFilterList()->begin();
|
FilterList::iterator begin = AssExportFilterChain::GetFilterList()->begin();
|
||||||
FilterList::iterator end = AssExportFilterChain::GetFilterList()->end();
|
FilterList::iterator end = AssExportFilterChain::GetFilterList()->end();
|
||||||
for (FilterList::iterator cur=begin;cur!=end;cur++) {
|
for (FilterList::iterator cur=begin;cur!=end;cur++) {
|
||||||
|
// Make sure to construct static box sizer first, so it won't overlap
|
||||||
|
// the controls on wxMac.
|
||||||
|
box = new wxStaticBoxSizer(wxVERTICAL,parent,(*cur)->RegisterName);
|
||||||
window = (*cur)->GetConfigDialogWindow(parent);
|
window = (*cur)->GetConfigDialogWindow(parent);
|
||||||
if (window) {
|
if (window) {
|
||||||
box = new wxStaticBoxSizer(wxVERTICAL,parent,(*cur)->RegisterName);
|
|
||||||
box->Add(window,0,wxEXPAND,0);
|
box->Add(window,0,wxEXPAND,0);
|
||||||
AddTo->Add(box,0,wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM,5);
|
AddTo->Add(box,0,wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM,5);
|
||||||
AddTo->Show(box,false);
|
AddTo->Show(box,false);
|
||||||
Sizers[(*cur)->RegisterName] = box;
|
Sizers[(*cur)->RegisterName] = box;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
delete box;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,7 @@ DialogExport::DialogExport (wxWindow *parent)
|
||||||
: wxDialog (parent, -1, _("Export"), wxDefaultPosition, wxSize(200,100), wxCAPTION | wxCLOSE_BOX, _T("Export"))
|
: wxDialog (parent, -1, _("Export"), wxDefaultPosition, wxSize(200,100), wxCAPTION | wxCLOSE_BOX, _T("Export"))
|
||||||
{
|
{
|
||||||
// Filter list
|
// Filter list
|
||||||
|
wxSizer *TopSizer = new wxStaticBoxSizer(wxVERTICAL,this,_("Filters"));
|
||||||
Export = new AssExporter(AssFile::top);
|
Export = new AssExporter(AssFile::top);
|
||||||
wxArrayString filters = Export->GetAllFilterNames();
|
wxArrayString filters = Export->GetAllFilterNames();
|
||||||
FilterList = new wxCheckListBox(this, Filter_List_Box, wxDefaultPosition, wxSize(200,100), filters);
|
FilterList = new wxCheckListBox(this, Filter_List_Box, wxDefaultPosition, wxSize(200,100), filters);
|
||||||
|
@ -102,7 +103,6 @@ DialogExport::DialogExport (wxWindow *parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Top sizer
|
// Top sizer
|
||||||
wxSizer *TopSizer = new wxStaticBoxSizer(wxVERTICAL,this,_("Filters"));
|
|
||||||
TopSizer->Add(FilterList,1,wxEXPAND,0);
|
TopSizer->Add(FilterList,1,wxEXPAND,0);
|
||||||
TopSizer->Add(TopButtons,0,wxEXPAND,0);
|
TopSizer->Add(TopButtons,0,wxEXPAND,0);
|
||||||
TopSizer->Add(Description,0,wxEXPAND | wxTOP,5);
|
TopSizer->Add(Description,0,wxEXPAND | wxTOP,5);
|
||||||
|
|
|
@ -52,6 +52,11 @@ DialogPasteOver::DialogPasteOver (wxWindow *parent)
|
||||||
// Script mode
|
// Script mode
|
||||||
int mode = 1; // ASS
|
int mode = 1; // ASS
|
||||||
|
|
||||||
|
// Label and list sizer
|
||||||
|
wxSizer *ListSizer = new wxStaticBoxSizer(wxVERTICAL,this,_("Fields"));
|
||||||
|
wxStaticText *label = new wxStaticText(this,-1,_("Please select the fields that you want to paste over:"),wxDefaultPosition,wxDefaultSize);
|
||||||
|
ListSizer->Add(label,0,wxEXPAND,0);
|
||||||
|
|
||||||
// List box
|
// List box
|
||||||
wxArrayString choices;
|
wxArrayString choices;
|
||||||
choices.Add(_("Layer"));
|
choices.Add(_("Layer"));
|
||||||
|
@ -71,16 +76,11 @@ DialogPasteOver::DialogPasteOver (wxWindow *parent)
|
||||||
choices.Add(_("Effect"));
|
choices.Add(_("Effect"));
|
||||||
choices.Add(_("Text"));
|
choices.Add(_("Text"));
|
||||||
ListBox = new wxCheckListBox(this,-1,wxDefaultPosition,wxSize(250,170), choices);
|
ListBox = new wxCheckListBox(this,-1,wxDefaultPosition,wxSize(250,170), choices);
|
||||||
|
ListSizer->Add(ListBox,0,wxEXPAND|wxTOP,5);
|
||||||
|
|
||||||
// Load checked items
|
// Load checked items
|
||||||
for (unsigned int i=0;i<choices.Count();i++) ListBox->Check(i,Options.AsBool(wxString::Format(_T("Paste Over #%i"),i)));
|
for (unsigned int i=0;i<choices.Count();i++) ListBox->Check(i,Options.AsBool(wxString::Format(_T("Paste Over #%i"),i)));
|
||||||
|
|
||||||
// Label and list sizer
|
|
||||||
wxStaticText *label = new wxStaticText(this,-1,_("Please select the fields that you want to paste over:"),wxDefaultPosition,wxDefaultSize);
|
|
||||||
wxSizer *ListSizer = new wxStaticBoxSizer(wxVERTICAL,this,_("Fields"));
|
|
||||||
ListSizer->Add(label,0,wxEXPAND,0);
|
|
||||||
ListSizer->Add(ListBox,0,wxEXPAND|wxTOP,5);
|
|
||||||
|
|
||||||
// Top buttons
|
// Top buttons
|
||||||
wxSizer *TopButtonSizer = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *TopButtonSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
TopButtonSizer->Add(new wxButton(this, Paste_Over_All, _("All")),1,0,0);
|
TopButtonSizer->Add(new wxButton(this, Paste_Over_All, _("All")),1,0,0);
|
||||||
|
|
|
@ -61,6 +61,7 @@ DialogProperties::DialogProperties (wxWindow *parent)
|
||||||
AssFile *subs = AssFile::top;
|
AssFile *subs = AssFile::top;
|
||||||
|
|
||||||
// Script details crap
|
// Script details crap
|
||||||
|
wxSizer *TopSizer = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Script"));
|
||||||
wxStaticText *TitleLabel = new wxStaticText(this,-1,_("Title:"));
|
wxStaticText *TitleLabel = new wxStaticText(this,-1,_("Title:"));
|
||||||
TitleEdit = new wxTextCtrl(this,-1,subs->GetScriptInfo(_T("Title")),wxDefaultPosition,wxSize(200,20));
|
TitleEdit = new wxTextCtrl(this,-1,subs->GetScriptInfo(_T("Title")),wxDefaultPosition,wxSize(200,20));
|
||||||
wxStaticText *OrigScriptLabel = new wxStaticText(this,-1,_("Original script:"));
|
wxStaticText *OrigScriptLabel = new wxStaticText(this,-1,_("Original script:"));
|
||||||
|
@ -77,7 +78,6 @@ DialogProperties::DialogProperties (wxWindow *parent)
|
||||||
UpdatedEdit = new wxTextCtrl(this,-1,subs->GetScriptInfo(_T("Script Updated By")),wxDefaultPosition,wxSize(200,20));
|
UpdatedEdit = new wxTextCtrl(this,-1,subs->GetScriptInfo(_T("Script Updated By")),wxDefaultPosition,wxSize(200,20));
|
||||||
wxStaticText *UpdateDetailsLabel = new wxStaticText(this,-1,_("Update details:"));
|
wxStaticText *UpdateDetailsLabel = new wxStaticText(this,-1,_("Update details:"));
|
||||||
UpdateDetailsEdit = new wxTextCtrl(this,-1,subs->GetScriptInfo(_T("Update Details")),wxDefaultPosition,wxSize(200,20));
|
UpdateDetailsEdit = new wxTextCtrl(this,-1,subs->GetScriptInfo(_T("Update Details")),wxDefaultPosition,wxSize(200,20));
|
||||||
wxSizer *TopSizer = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Script"));
|
|
||||||
wxFlexGridSizer *TopSizerGrid = new wxFlexGridSizer(0,2,5,5);
|
wxFlexGridSizer *TopSizerGrid = new wxFlexGridSizer(0,2,5,5);
|
||||||
TopSizerGrid->Add(TitleLabel,0,wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL,0);
|
TopSizerGrid->Add(TitleLabel,0,wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL,0);
|
||||||
TopSizerGrid->Add(TitleEdit,1,wxEXPAND,0);
|
TopSizerGrid->Add(TitleEdit,1,wxEXPAND,0);
|
||||||
|
|
|
@ -53,6 +53,11 @@ wxDialog (parent,-1,_("Select"),wxDefaultPosition,wxDefaultSize,wxCAPTION)
|
||||||
// Variables
|
// Variables
|
||||||
grid = _grid;
|
grid = _grid;
|
||||||
|
|
||||||
|
// Static-box sizers before anything else
|
||||||
|
wxSizer *MatchSizer = new wxStaticBoxSizer(wxVERTICAL,this,_("Match"));
|
||||||
|
wxSizer *MatchTopSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
wxSizer *DialogueSizer = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Match dialogues/comments"));
|
||||||
|
|
||||||
// Matches box
|
// Matches box
|
||||||
Matches = new wxRadioButton(this,-1,_("Matches"),wxDefaultPosition,wxDefaultSize,wxRB_GROUP);
|
Matches = new wxRadioButton(this,-1,_("Matches"),wxDefaultPosition,wxDefaultSize,wxRB_GROUP);
|
||||||
DoesntMatch = new wxRadioButton(this,-1,_("Doesn't Match"),wxDefaultPosition,wxDefaultSize,0);
|
DoesntMatch = new wxRadioButton(this,-1,_("Doesn't Match"),wxDefaultPosition,wxDefaultSize,0);
|
||||||
|
@ -83,8 +88,6 @@ wxDialog (parent,-1,_("Select"),wxDefaultPosition,wxDefaultSize,wxCAPTION)
|
||||||
Action = new wxRadioBox(this,-1,_("Action"),wxDefaultPosition,wxDefaultSize,actions,1);
|
Action = new wxRadioBox(this,-1,_("Action"),wxDefaultPosition,wxDefaultSize,actions,1);
|
||||||
|
|
||||||
// Matches box sizer
|
// Matches box sizer
|
||||||
wxSizer *MatchSizer = new wxStaticBoxSizer(wxVERTICAL,this,_("Match"));
|
|
||||||
wxSizer *MatchTopSizer = new wxBoxSizer(wxHORIZONTAL);
|
|
||||||
MatchTopSizer->Add(Matches,0,wxEXPAND|wxRIGHT,5);
|
MatchTopSizer->Add(Matches,0,wxEXPAND|wxRIGHT,5);
|
||||||
MatchTopSizer->Add(DoesntMatch,0,wxEXPAND,0);
|
MatchTopSizer->Add(DoesntMatch,0,wxEXPAND,0);
|
||||||
MatchTopSizer->AddStretchSpacer(1);
|
MatchTopSizer->AddStretchSpacer(1);
|
||||||
|
@ -96,7 +99,6 @@ wxDialog (parent,-1,_("Select"),wxDefaultPosition,wxDefaultSize,wxCAPTION)
|
||||||
MatchSizer->Add(RegExp,0,wxTOP|wxEXPAND,5);
|
MatchSizer->Add(RegExp,0,wxTOP|wxEXPAND,5);
|
||||||
|
|
||||||
// Dialogues / Comments box
|
// Dialogues / Comments box
|
||||||
wxSizer *DialogueSizer = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Match dialogues/comments"));
|
|
||||||
DialogueSizer->Add(MatchDialogues,0, wxRIGHT|wxEXPAND,5);
|
DialogueSizer->Add(MatchDialogues,0, wxRIGHT|wxEXPAND,5);
|
||||||
DialogueSizer->Add(MatchComments,0, wxEXPAND);
|
DialogueSizer->Add(MatchComments,0, wxEXPAND);
|
||||||
|
|
||||||
|
|
|
@ -67,11 +67,15 @@ DialogShiftTimes::DialogShiftTimes (wxWindow *parent,SubtitlesGrid *_grid)
|
||||||
grid = _grid;
|
grid = _grid;
|
||||||
shiftframe = 0;
|
shiftframe = 0;
|
||||||
|
|
||||||
|
// Static-box sizers before anything else
|
||||||
|
wxSizer *TimesSizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Shift by"));
|
||||||
|
wxSizer *HistorySizer = new wxStaticBoxSizer(wxVERTICAL,this,_("History"));
|
||||||
|
|
||||||
// Times
|
// Times
|
||||||
RadioTime = new wxRadioButton(this,RADIO_TIME,_("Time: "),wxDefaultPosition,wxSize(60,20), wxRB_GROUP);
|
RadioTime = new wxRadioButton(this,RADIO_TIME,_("Time: "),wxDefaultPosition,wxDefaultSize, wxRB_GROUP);
|
||||||
RadioFrames = new wxRadioButton(this,RADIO_FRAME,_("Frames: "),wxDefaultPosition,wxSize(60,20));
|
RadioFrames = new wxRadioButton(this,RADIO_FRAME,_("Frames: "),wxDefaultPosition,wxDefaultSize);
|
||||||
ShiftTime = new TimeEdit(this,TEXT_SHIFT_TIME,_T(""),wxDefaultPosition,wxSize(60,20));
|
ShiftTime = new TimeEdit(this,TEXT_SHIFT_TIME,_T(""),wxDefaultPosition,wxDefaultSize);
|
||||||
ShiftFrame = new wxTextCtrl(this,TEXT_SHIFT_FRAME,wxString::Format(_T("%i"),shiftframe),wxDefaultPosition,wxSize(60,20));
|
ShiftFrame = new wxTextCtrl(this,TEXT_SHIFT_FRAME,wxString::Format(_T("%i"),shiftframe),wxDefaultPosition,wxDefaultSize);
|
||||||
ShiftTime->SetToolTip(_("Enter time in h:mm:ss.cs notation"));
|
ShiftTime->SetToolTip(_("Enter time in h:mm:ss.cs notation"));
|
||||||
RadioTime->SetToolTip(_("Shift by time"));
|
RadioTime->SetToolTip(_("Shift by time"));
|
||||||
ShiftFrame->Disable();
|
ShiftFrame->Disable();
|
||||||
|
@ -80,12 +84,11 @@ DialogShiftTimes::DialogShiftTimes (wxWindow *parent,SubtitlesGrid *_grid)
|
||||||
ShiftFrame->SetToolTip(_("Enter number of frames to shift by"));
|
ShiftFrame->SetToolTip(_("Enter number of frames to shift by"));
|
||||||
RadioFrames->SetToolTip(_("Shift by frames"));
|
RadioFrames->SetToolTip(_("Shift by frames"));
|
||||||
}
|
}
|
||||||
wxSizer *TimeSizer = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *TimeFrameSizer = new wxFlexGridSizer(2,2,5,5);
|
||||||
wxSizer *FrameSizer = new wxBoxSizer(wxHORIZONTAL);
|
TimeFrameSizer->Add(RadioTime,0,wxALIGN_CENTER_VERTICAL,0);
|
||||||
TimeSizer->Add(RadioTime,0,wxALIGN_CENTER_VERTICAL,0);
|
TimeFrameSizer->Add(ShiftTime,1);
|
||||||
TimeSizer->Add(ShiftTime,1,wxLEFT,5);
|
TimeFrameSizer->Add(RadioFrames,0,wxALIGN_CENTER_VERTICAL,0);
|
||||||
FrameSizer->Add(RadioFrames,0,wxALIGN_CENTER_VERTICAL,0);
|
TimeFrameSizer->Add(ShiftFrame,1);
|
||||||
FrameSizer->Add(ShiftFrame,1,wxLEFT,5);
|
|
||||||
|
|
||||||
// Direction
|
// Direction
|
||||||
DirectionForward = new wxRadioButton(this,-1,_("Forward"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
|
DirectionForward = new wxRadioButton(this,-1,_("Forward"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
|
||||||
|
@ -95,9 +98,7 @@ DialogShiftTimes::DialogShiftTimes (wxWindow *parent,SubtitlesGrid *_grid)
|
||||||
wxSizer *DirectionSizer = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *DirectionSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
DirectionSizer->Add(DirectionForward,1,wxEXPAND,0);
|
DirectionSizer->Add(DirectionForward,1,wxEXPAND,0);
|
||||||
DirectionSizer->Add(DirectionBackward,1,wxLEFT | wxEXPAND,5);
|
DirectionSizer->Add(DirectionBackward,1,wxLEFT | wxEXPAND,5);
|
||||||
wxSizer *TimesSizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Shift by"));
|
TimesSizer->Add(TimeFrameSizer,0,wxEXPAND,0);
|
||||||
TimesSizer->Add(TimeSizer,0,wxEXPAND,0);
|
|
||||||
TimesSizer->Add(FrameSizer,0,wxEXPAND | wxTOP,5);
|
|
||||||
TimesSizer->Add(DirectionSizer,0,wxEXPAND | wxTOP,5);
|
TimesSizer->Add(DirectionSizer,0,wxEXPAND | wxTOP,5);
|
||||||
|
|
||||||
// Selection
|
// Selection
|
||||||
|
@ -109,7 +110,6 @@ DialogShiftTimes::DialogShiftTimes (wxWindow *parent,SubtitlesGrid *_grid)
|
||||||
TimesChoice = new wxRadioBox(this,-1,_("Times"), wxDefaultPosition, wxDefaultSize, 3, TimesChoices, 3, wxRA_SPECIFY_ROWS);
|
TimesChoice = new wxRadioBox(this,-1,_("Times"), wxDefaultPosition, wxDefaultSize, 3, TimesChoices, 3, wxRA_SPECIFY_ROWS);
|
||||||
|
|
||||||
// History
|
// History
|
||||||
wxSizer *HistorySizer = new wxStaticBoxSizer(wxVERTICAL,this,_("History"));
|
|
||||||
History = new wxListBox(this,-1,wxDefaultPosition,wxSize(350,100), 0, NULL, wxLB_HSCROLL);
|
History = new wxListBox(this,-1,wxDefaultPosition,wxSize(350,100), 0, NULL, wxLB_HSCROLL);
|
||||||
HistorySizer->Add(History,1,wxEXPAND,0);
|
HistorySizer->Add(History,1,wxEXPAND,0);
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ DialogTimingProcessor::DialogTimingProcessor(wxWindow *parent,SubtitlesGrid *_gr
|
||||||
adjsThresTime = Options.AsText(_T("Timing processor adjascent thres"));
|
adjsThresTime = Options.AsText(_T("Timing processor adjascent thres"));
|
||||||
|
|
||||||
// Styles box
|
// Styles box
|
||||||
|
wxSizer *LeftSizer = new wxStaticBoxSizer(wxVERTICAL,this,_("Apply to styles"));
|
||||||
wxArrayString styles = grid->ass->GetStyles();
|
wxArrayString styles = grid->ass->GetStyles();
|
||||||
StyleList = new wxCheckListBox(this,TIMING_STYLE_LIST,wxDefaultPosition,wxSize(150,150),styles);
|
StyleList = new wxCheckListBox(this,TIMING_STYLE_LIST,wxDefaultPosition,wxSize(150,150),styles);
|
||||||
StyleList->SetToolTip(_("Select styles to process. Unchecked ones will be ignored."));
|
StyleList->SetToolTip(_("Select styles to process. Unchecked ones will be ignored."));
|
||||||
|
@ -170,7 +171,6 @@ DialogTimingProcessor::DialogTimingProcessor(wxWindow *parent,SubtitlesGrid *_gr
|
||||||
StyleButtonsSizer->Add(none,1,0,0);
|
StyleButtonsSizer->Add(none,1,0,0);
|
||||||
|
|
||||||
// Left sizer
|
// Left sizer
|
||||||
wxSizer *LeftSizer = new wxStaticBoxSizer(wxVERTICAL,this,_("Apply to styles"));
|
|
||||||
size_t len = StyleList->GetCount();
|
size_t len = StyleList->GetCount();
|
||||||
for (size_t i=0;i<len;i++) {
|
for (size_t i=0;i<len;i++) {
|
||||||
StyleList->Check(i);
|
StyleList->Check(i);
|
||||||
|
|
|
@ -127,8 +127,7 @@ wxWindow *AssTransformFramerateFilter::GetConfigDialogWindow(wxWindow *parent) {
|
||||||
MainSizer->Add(OutputSizer,0,wxEXPAND,0);
|
MainSizer->Add(OutputSizer,0,wxEXPAND,0);
|
||||||
|
|
||||||
// Window
|
// Window
|
||||||
MainSizer->SetSizeHints(base);
|
base->SetSizerAndFit(MainSizer);
|
||||||
base->SetSizer(MainSizer);
|
|
||||||
return base;
|
return base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue