forked from mia/Aegisub
Move the Margin controls to an array
This commit is contained in:
parent
fae9a5496a
commit
3045e2d012
2 changed files with 7 additions and 9 deletions
|
@ -134,9 +134,9 @@ SubsEditBox::SubsEditBox(wxWindow *parent, agi::Context *context)
|
||||||
Duration = MakeTimeCtrl(_("Line duration"), TIME_DURATION);
|
Duration = MakeTimeCtrl(_("Line duration"), TIME_DURATION);
|
||||||
MiddleSizer->AddSpacer(5);
|
MiddleSizer->AddSpacer(5);
|
||||||
|
|
||||||
MarginL = MakeMarginCtrl(_("Left Margin (0 = default)"), 0, _("left margin change"));
|
Margin[0] = MakeMarginCtrl(_("Left Margin (0 = default)"), 0, _("left margin change"));
|
||||||
MarginR = MakeMarginCtrl(_("Right Margin (0 = default)"), 1, _("right margin change"));
|
Margin[1] = MakeMarginCtrl(_("Right Margin (0 = default)"), 1, _("right margin change"));
|
||||||
MarginV = MakeMarginCtrl(_("Vertical Margin (0 = default)"), 2, _("vertical margin change"));
|
Margin[2] = MakeMarginCtrl(_("Vertical Margin (0 = default)"), 2, _("vertical margin change"));
|
||||||
MiddleSizer->AddSpacer(5);
|
MiddleSizer->AddSpacer(5);
|
||||||
|
|
||||||
// Middle-bottom controls
|
// Middle-bottom controls
|
||||||
|
@ -291,9 +291,8 @@ void SubsEditBox::OnCommit(int type) {
|
||||||
|
|
||||||
if (type & AssFile::COMMIT_DIAG_META) {
|
if (type & AssFile::COMMIT_DIAG_META) {
|
||||||
Layer->SetValue(line->Layer);
|
Layer->SetValue(line->Layer);
|
||||||
change_value(MarginL, line->GetMarginString(0,false));
|
for (size_t i = 0; i < Margin.size(); ++i)
|
||||||
change_value(MarginR, line->GetMarginString(1,false));
|
change_value(Margin[i], line->GetMarginString(i, false));
|
||||||
change_value(MarginV, line->GetMarginString(2,false));
|
|
||||||
CommentBox->SetValue(line->Comment);
|
CommentBox->SetValue(line->Comment);
|
||||||
StyleBox->Select(StyleBox->FindString(line->Style));
|
StyleBox->Select(StyleBox->FindString(line->Style));
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
/// @ingroup main_ui
|
/// @ingroup main_ui
|
||||||
///
|
///
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <boost/container/map.hpp>
|
#include <boost/container/map.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -99,9 +100,7 @@ class SubsEditBox : public wxPanel {
|
||||||
TimeEdit *EndTime;
|
TimeEdit *EndTime;
|
||||||
TimeEdit *Duration;
|
TimeEdit *Duration;
|
||||||
wxSpinCtrl *Layer;
|
wxSpinCtrl *Layer;
|
||||||
wxTextCtrl *MarginL;
|
std::array<wxTextCtrl *, 3> Margin;
|
||||||
wxTextCtrl *MarginR;
|
|
||||||
wxTextCtrl *MarginV;
|
|
||||||
Placeholder<wxComboBox> *Effect;
|
Placeholder<wxComboBox> *Effect;
|
||||||
wxRadioButton *ByTime;
|
wxRadioButton *ByTime;
|
||||||
wxRadioButton *ByFrame;
|
wxRadioButton *ByFrame;
|
||||||
|
|
Loading…
Add table
Reference in a new issue