Fix sizer creation order so dialogue works on wxMac
Originally committed to SVN as r1589.
This commit is contained in:
parent
4a4605f769
commit
3fd97b551f
1 changed files with 9 additions and 7 deletions
|
@ -127,6 +127,15 @@ DialogStyleEditor::DialogStyleEditor (wxWindow *parent, AssStyle *_style, Subtit
|
||||||
// Encoding options
|
// Encoding options
|
||||||
wxArrayString encodingStrings;
|
wxArrayString encodingStrings;
|
||||||
AssStyle::GetEncodings(encodingStrings);
|
AssStyle::GetEncodings(encodingStrings);
|
||||||
|
|
||||||
|
// Create sizers
|
||||||
|
wxSizer *NameSizer = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Style name"));
|
||||||
|
wxSizer *FontSizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Font"));
|
||||||
|
wxSizer *ColorsSizer = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Colors"));
|
||||||
|
wxSizer *MarginSizer = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Margins"));
|
||||||
|
wxSizer *OutlineBox = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Outline"));
|
||||||
|
wxSizer *MiscBox = new wxStaticBoxSizer(wxVERTICAL,this,_("Miscelaneous"));
|
||||||
|
wxSizer *PreviewBox = new wxStaticBoxSizer(wxVERTICAL,this,_("Preview"));
|
||||||
|
|
||||||
// Create controls
|
// Create controls
|
||||||
StyleName = new wxTextCtrl(this,-1,style->name);
|
StyleName = new wxTextCtrl(this,-1,style->name);
|
||||||
|
@ -209,11 +218,9 @@ DialogStyleEditor::DialogStyleEditor (wxWindow *parent, AssStyle *_style, Subtit
|
||||||
if (!found) Encoding->Select(0);
|
if (!found) Encoding->Select(0);
|
||||||
|
|
||||||
// Style name sizer
|
// Style name sizer
|
||||||
wxSizer *NameSizer = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Style name"));
|
|
||||||
NameSizer->Add(StyleName,1,wxALL,0);
|
NameSizer->Add(StyleName,1,wxALL,0);
|
||||||
|
|
||||||
// Font sizer
|
// Font sizer
|
||||||
wxSizer *FontSizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Font"));
|
|
||||||
wxSizer *FontSizerTop = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *FontSizerTop = new wxBoxSizer(wxHORIZONTAL);
|
||||||
wxSizer *FontSizerBottom = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *FontSizerBottom = new wxBoxSizer(wxHORIZONTAL);
|
||||||
FontSizerTop->Add(FontName,1,wxALL,0);
|
FontSizerTop->Add(FontName,1,wxALL,0);
|
||||||
|
@ -229,7 +236,6 @@ DialogStyleEditor::DialogStyleEditor (wxWindow *parent, AssStyle *_style, Subtit
|
||||||
FontSizer->Add(FontSizerBottom,1,wxTOP | wxEXPAND,5);
|
FontSizer->Add(FontSizerBottom,1,wxTOP | wxEXPAND,5);
|
||||||
|
|
||||||
// Colors sizer
|
// Colors sizer
|
||||||
wxSizer *ColorsSizer = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Colors"));
|
|
||||||
wxSizer *ColorSizer[4];
|
wxSizer *ColorSizer[4];
|
||||||
wxString colorLabels[] = { _("Primary"), _("Secondary"), _("Outline"), _("Shadow") };
|
wxString colorLabels[] = { _("Primary"), _("Secondary"), _("Outline"), _("Shadow") };
|
||||||
ColorsSizer->AddStretchSpacer(1);
|
ColorsSizer->AddStretchSpacer(1);
|
||||||
|
@ -244,7 +250,6 @@ DialogStyleEditor::DialogStyleEditor (wxWindow *parent, AssStyle *_style, Subtit
|
||||||
|
|
||||||
// Margins
|
// Margins
|
||||||
wxString marginLabels[] = { _("Left"), _("Right"), _("Vert") };
|
wxString marginLabels[] = { _("Left"), _("Right"), _("Vert") };
|
||||||
wxSizer *MarginSizer = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Margins"));
|
|
||||||
MarginSizer->AddStretchSpacer(1);
|
MarginSizer->AddStretchSpacer(1);
|
||||||
wxSizer *marginSubSizer[3];
|
wxSizer *marginSubSizer[3];
|
||||||
for (int i=0;i<3;i++) {
|
for (int i=0;i<3;i++) {
|
||||||
|
@ -263,7 +268,6 @@ DialogStyleEditor::DialogStyleEditor (wxWindow *parent, AssStyle *_style, Subtit
|
||||||
MarginAlign->Add(Alignment,0,wxLEFT | wxEXPAND,5);
|
MarginAlign->Add(Alignment,0,wxLEFT | wxEXPAND,5);
|
||||||
|
|
||||||
// Outline
|
// Outline
|
||||||
wxSizer *OutlineBox = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Outline"));
|
|
||||||
OutlineBox->AddStretchSpacer(1);
|
OutlineBox->AddStretchSpacer(1);
|
||||||
OutlineBox->Add(new wxStaticText(this,-1,_("Outline:")),0,wxALIGN_CENTER,0);
|
OutlineBox->Add(new wxStaticText(this,-1,_("Outline:")),0,wxALIGN_CENTER,0);
|
||||||
OutlineBox->Add(Outline,0,wxLEFT | wxALIGN_CENTER,5);
|
OutlineBox->Add(Outline,0,wxLEFT | wxALIGN_CENTER,5);
|
||||||
|
@ -273,7 +277,6 @@ DialogStyleEditor::DialogStyleEditor (wxWindow *parent, AssStyle *_style, Subtit
|
||||||
OutlineBox->AddStretchSpacer(1);
|
OutlineBox->AddStretchSpacer(1);
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
wxSizer *MiscBox = new wxStaticBoxSizer(wxVERTICAL,this,_("Miscelaneous"));
|
|
||||||
wxFlexGridSizer *MiscBoxTop = new wxFlexGridSizer(2,4,5,5);
|
wxFlexGridSizer *MiscBoxTop = new wxFlexGridSizer(2,4,5,5);
|
||||||
wxSizer *MiscBoxBottom = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *MiscBoxBottom = new wxBoxSizer(wxHORIZONTAL);
|
||||||
MiscBoxTop->Add(new wxStaticText(this,-1,_("Scale X%:")),1,wxALIGN_CENTER,0);
|
MiscBoxTop->Add(new wxStaticText(this,-1,_("Scale X%:")),1,wxALIGN_CENTER,0);
|
||||||
|
@ -292,7 +295,6 @@ DialogStyleEditor::DialogStyleEditor (wxWindow *parent, AssStyle *_style, Subtit
|
||||||
MiscBox->Add(MiscBoxBottom,1,wxEXPAND | wxTOP | wxALIGN_CENTER,5);
|
MiscBox->Add(MiscBoxBottom,1,wxEXPAND | wxTOP | wxALIGN_CENTER,5);
|
||||||
|
|
||||||
// Preview
|
// Preview
|
||||||
wxSizer *PreviewBox = new wxStaticBoxSizer(wxVERTICAL,this,_("Preview"));
|
|
||||||
SubsPreview = NULL;
|
SubsPreview = NULL;
|
||||||
PreviewText = NULL;
|
PreviewText = NULL;
|
||||||
if (SubtitlesProviderFactory::ProviderAvailable()) {
|
if (SubtitlesProviderFactory::ProviderAvailable()) {
|
||||||
|
|
Loading…
Reference in a new issue