From f1a8d80f0de185a8e6d211360f67aad8b5bd8475 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Fri, 18 Jan 2008 17:07:00 +0000 Subject: [PATCH] A few more fixes pointed out by Yuri Originally committed to SVN as r1766. --- aegisub/dialog_colorpicker.cpp | 48 ++++++++++++++++++---------------- aegisub/dialog_kanji_timer.cpp | 2 +- aegisub/dialog_options.cpp | 7 ++--- 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/aegisub/dialog_colorpicker.cpp b/aegisub/dialog_colorpicker.cpp index 45a56d2f2..5dda7328b 100644 --- a/aegisub/dialog_colorpicker.cpp +++ b/aegisub/dialog_colorpicker.cpp @@ -513,40 +513,44 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, wxColour initial_color) spectrum_sizer->Add(slider); spectrum_box->Add(spectrum_sizer, 0, wxALL, 3); - wxSizer *rgb_sizer = new wxFlexGridSizer(3, 2, 5, 5); - rgb_sizer->Add(new wxStaticText(this, -1, _("Red:"), wxDefaultPosition, colorinput_labelsize), 0, wxALIGN_CENTER_VERTICAL); + wxFlexGridSizer *rgb_sizer = new wxFlexGridSizer(3, 2, 5, 5); + rgb_sizer->Add(new wxStaticText(this, -1, _("Red:"), wxDefaultPosition, colorinput_labelsize), 1, wxALIGN_CENTER_VERTICAL|wxEXPAND); rgb_sizer->Add(rgb_input[0], 0); - rgb_sizer->Add(new wxStaticText(this, -1, _("Green:"), wxDefaultPosition, colorinput_labelsize), 0, wxALIGN_CENTER_VERTICAL); + rgb_sizer->Add(new wxStaticText(this, -1, _("Green:"), wxDefaultPosition, colorinput_labelsize), 1, wxALIGN_CENTER_VERTICAL|wxEXPAND); rgb_sizer->Add(rgb_input[1], 0); - rgb_sizer->Add(new wxStaticText(this, -1, _("Blue:"), wxDefaultPosition, colorinput_labelsize), 0, wxALIGN_CENTER_VERTICAL); + rgb_sizer->Add(new wxStaticText(this, -1, _("Blue:"), wxDefaultPosition, colorinput_labelsize), 1, wxALIGN_CENTER_VERTICAL|wxEXPAND); rgb_sizer->Add(rgb_input[2], 0); - rgb_box->Add(rgb_sizer, 0, wxALL, 3); + rgb_sizer->AddGrowableCol(0,1); + rgb_box->Add(rgb_sizer, 1, wxEXPAND | wxALL, 3); - wxSizer *ass_input_sizer = new wxFlexGridSizer(2, 2, 5, 5); - ass_input_sizer->Add(new wxStaticText(this, -1, _T("ASS:"), wxDefaultPosition, colorinput_labelsize), 0, wxALIGN_CENTER_VERTICAL); + wxFlexGridSizer *ass_input_sizer = new wxFlexGridSizer(2, 2, 5, 5); + ass_input_sizer->Add(new wxStaticText(this, -1, _T("ASS:"), wxDefaultPosition, colorinput_labelsize), 1, wxALIGN_CENTER_VERTICAL|wxEXPAND); ass_input_sizer->Add(ass_input, 0); - ass_input_sizer->Add(new wxStaticText(this, -1, _T("HTML:"), wxDefaultPosition, colorinput_labelsize), 0, wxALIGN_CENTER_VERTICAL); + ass_input_sizer->Add(new wxStaticText(this, -1, _T("HTML:"), wxDefaultPosition, colorinput_labelsize), 1, wxALIGN_CENTER_VERTICAL|wxEXPAND); ass_input_sizer->Add(html_input, 0); - rgb_box->AddStretchSpacer(); - rgb_box->Add(ass_input_sizer, 0, wxALL|wxCENTER, 3); + ass_input_sizer->AddStretchSpacer(); + ass_input_sizer->AddGrowableCol(0,1); + rgb_box->Add(ass_input_sizer, 0, wxALL|wxCENTER|wxEXPAND, 3); - wxSizer *hsl_sizer = new wxFlexGridSizer(3, 2, 5, 5); - hsl_sizer->Add(new wxStaticText(this, -1, _("Hue:"), wxDefaultPosition, colorinput_labelsize), 0, wxALIGN_CENTER_VERTICAL); + wxFlexGridSizer *hsl_sizer = new wxFlexGridSizer(3, 2, 5, 5); + hsl_sizer->Add(new wxStaticText(this, -1, _("Hue:"), wxDefaultPosition, colorinput_labelsize), 1, wxALIGN_CENTER_VERTICAL|wxEXPAND); hsl_sizer->Add(hsl_input[0], 0); - hsl_sizer->Add(new wxStaticText(this, -1, _("Sat.:"), wxDefaultPosition, colorinput_labelsize), 0, wxALIGN_CENTER_VERTICAL); + hsl_sizer->Add(new wxStaticText(this, -1, _("Sat.:"), wxDefaultPosition, colorinput_labelsize), 1, wxALIGN_CENTER_VERTICAL|wxEXPAND); hsl_sizer->Add(hsl_input[1], 0); - hsl_sizer->Add(new wxStaticText(this, -1, _("Lum.:"), wxDefaultPosition, colorinput_labelsize), 0, wxALIGN_CENTER_VERTICAL); + hsl_sizer->Add(new wxStaticText(this, -1, _("Lum.:"), wxDefaultPosition, colorinput_labelsize), 1, wxALIGN_CENTER_VERTICAL|wxEXPAND); hsl_sizer->Add(hsl_input[2], 0); - hsl_box->Add(hsl_sizer, 0, wxALL, 3); + hsl_sizer->AddGrowableCol(0,1); + hsl_box->Add(hsl_sizer, 0, wxALL|wxEXPAND, 3); - wxSizer *hsv_sizer = new wxFlexGridSizer(3, 2, 5, 5); - hsv_sizer->Add(new wxStaticText(this, -1, _("Hue:"), wxDefaultPosition, colorinput_labelsize), 0, wxALIGN_CENTER_VERTICAL); + wxFlexGridSizer *hsv_sizer = new wxFlexGridSizer(3, 2, 5, 5); + hsv_sizer->Add(new wxStaticText(this, -1, _("Hue:"), wxDefaultPosition, colorinput_labelsize), 1, wxALIGN_CENTER_VERTICAL|wxEXPAND); hsv_sizer->Add(hsv_input[0], 0); - hsv_sizer->Add(new wxStaticText(this, -1, _("Sat.:"), wxDefaultPosition, colorinput_labelsize), 0, wxALIGN_CENTER_VERTICAL); + hsv_sizer->Add(new wxStaticText(this, -1, _("Sat.:"), wxDefaultPosition, colorinput_labelsize), 1, wxALIGN_CENTER_VERTICAL|wxEXPAND); hsv_sizer->Add(hsv_input[1], 0); - hsv_sizer->Add(new wxStaticText(this, -1, _("Value:"), wxDefaultPosition, colorinput_labelsize), 0, wxALIGN_CENTER_VERTICAL); + hsv_sizer->Add(new wxStaticText(this, -1, _("Value:"), wxDefaultPosition, colorinput_labelsize), 1, wxALIGN_CENTER_VERTICAL|wxEXPAND); hsv_sizer->Add(hsv_input[2], 0); - hsv_box->Add(hsv_sizer, 0, wxALL, 3); + hsv_sizer->AddGrowableCol(0,1); + hsv_box->Add(hsv_sizer, 0, wxALL|wxEXPAND, 3); wxSizer *hsx_sizer = new wxBoxSizer(wxHORIZONTAL); hsx_sizer->Add(hsl_box); @@ -564,7 +568,7 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, wxColour initial_color) wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer(); button_sizer->AddButton(new wxButton(this,wxID_OK)); button_sizer->AddButton(new wxButton(this,wxID_CANCEL)); - button_sizer->AddButton(new HelpButton(this,_T("Colour Picker"))); + button_sizer->AddButton(new HelpButton(this,_("Colour Picker"))); button_sizer->Realize(); wxSizer *input_sizer = new wxBoxSizer(wxVERTICAL); @@ -577,7 +581,7 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, wxColour initial_color) input_sizer->Add(button_sizer, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM); wxSizer *main_sizer = new wxBoxSizer(wxHORIZONTAL); - main_sizer->Add(spectrum_box, 0, wxALL, 5); + main_sizer->Add(spectrum_box, 1, wxALL | wxEXPAND, 5); main_sizer->Add(input_sizer, 0, (wxALL&~wxLEFT)|wxEXPAND, 5); SetSizer(main_sizer); diff --git a/aegisub/dialog_kanji_timer.cpp b/aegisub/dialog_kanji_timer.cpp index 8e9d16ab1..891c93283 100644 --- a/aegisub/dialog_kanji_timer.cpp +++ b/aegisub/dialog_kanji_timer.cpp @@ -96,7 +96,7 @@ DialogKanjiTimer::DialogKanjiTimer(wxWindow *parent, SubtitlesGrid *_grid) GroupsList->InsertColumn(1, _T(""), wxLIST_FORMAT_CENTER, 72); //Buttons - wxButton *Start = new wxButton(this,BUTTON_KTSTART,_("Start")); + wxButton *Start = new wxButton(this,BUTTON_KTSTART,_("Start!")); wxButton *Link = new wxButton(this,BUTTON_KTLINK,_("Link")); wxButton *Unlink = new wxButton(this,BUTTON_KTUNLINK,_("Unlink")); wxButton *SkipSourceLine = new wxButton(this,BUTTON_KTSKIPSOURCE,_("Skip Source Line")); diff --git a/aegisub/dialog_options.cpp b/aegisub/dialog_options.cpp index 6a8167077..cd24fe4b0 100644 --- a/aegisub/dialog_options.cpp +++ b/aegisub/dialog_options.cpp @@ -107,12 +107,13 @@ DialogOptions::DialogOptions(wxWindow *parent) { wxSizer *genMainSizer = new wxBoxSizer(wxVERTICAL); wxSizer *genSizer1 = new wxStaticBoxSizer(wxHORIZONTAL,generalPage,_("Startup")); - wxSizer *genSizer4 = new wxFlexGridSizer(2,2,5,5); + wxFlexGridSizer *genSizer4 = new wxFlexGridSizer(2,2,5,5); AddCheckBox(generalPage,genSizer4,_("Show Splash Screen"),_T("Show splash")); AddCheckBox(generalPage,genSizer4,_("Show Tip of the Day"),_T("Tips enabled")); AddCheckBox(generalPage,genSizer4,_("Auto Check for Updates"),_T("Auto check for updates")); AddCheckBox(generalPage,genSizer4,_("Save config.dat locally"),_T("Local config")); + genSizer4->AddGrowableCol(0,1); genSizer1->Add(genSizer4,1,wxEXPAND|wxALL,5); wxSizer *genSizer2 = new wxStaticBoxSizer(wxVERTICAL,generalPage,_("Limits for levels and recent files")); @@ -221,7 +222,7 @@ DialogOptions::DialogOptions(wxWindow *parent) Bind(control,options1[i]); editSizer2->Add(control,1,wxEXPAND,0); } - editSizer2->AddGrowableCol(0,1); + //editSizer2->AddGrowableCol(0,1); editSizer2->AddGrowableCol(1,1); editSizer6->Add(new wxStaticText(editPage,-1,_("Path to dictionary files:")),0,wxALIGN_CENTER_VERTICAL|wxRIGHT,5); wxTextCtrl *edit = new wxTextCtrl(editPage,-1,_T("")); @@ -444,7 +445,7 @@ DialogOptions::DialogOptions(wxWindow *parent) AddCheckBox(audioPage,audioSizer3,_("Snap to keyframes"),_T("Audio snap to keyframes")); AddCheckBox(audioPage,audioSizer3,_("Snap to adjascent lines"),_T("Audio snap to other lines")); AddCheckBox(audioPage,audioSizer3,_("Auto-focus on mouse over"),_T("Audio Autofocus")); - audioSizer3->AddGrowableCol(0,1); + audioSizer3->AddGrowableCol(1,1); // Second sizer wxString choices1[3] = { _("Don't show"), _("Show previous"), _("Show all") };