diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-08-22 19:00:37 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-08-22 19:00:37 +0100 |
| commit | c596f82dd04c8aff3730bbb5754c35ce095afde1 (patch) | |
| tree | 4c03c7dc7bdaaefbc88f406021721bc9be327609 /src | |
| parent | a22b277dd8896511a322459f45db8e99ad1ab7fe (diff) | |
Compact text panel a little.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/text_panel.cc | 62 |
1 files changed, 24 insertions, 38 deletions
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index 68f246913..3315e5cf9 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -90,45 +90,31 @@ TextPanel::TextPanel (ContentPanel* p, TextType t) grid->Add (_burn, wxGBPosition (r, 0), wxGBSpan (1, 2)); ++r; - { - add_label_to_sizer (grid, this, _("X Offset"), true, wxGBPosition (r, 0)); - wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL); - _x_offset = new wxSpinCtrl (this); - s->Add (_x_offset); - add_label_to_sizer (s, this, _("%"), false); - grid->Add (s, wxGBPosition (r, 1)); - ++r; - } - - { - add_label_to_sizer (grid, this, _("Y Offset"), true, wxGBPosition (r, 0)); - wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL); - _y_offset = new wxSpinCtrl (this); - s->Add (_y_offset); - add_label_to_sizer (s, this, _("%"), false); - grid->Add (s, wxGBPosition (r, 1)); - ++r; - } - - { - add_label_to_sizer (grid, this, _("X Scale"), true, wxGBPosition (r, 0)); - wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL); - _x_scale = new wxSpinCtrl (this); - s->Add (_x_scale); - add_label_to_sizer (s, this, _("%"), false); - grid->Add (s, wxGBPosition (r, 1)); - ++r; - } + add_label_to_sizer (grid, this, _("Offset"), true, wxGBPosition (r, 0)); + wxBoxSizer* offset = new wxBoxSizer (wxHORIZONTAL); + add_label_to_sizer (offset, this, _("X"), true); + _x_offset = new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(64, -1)); + offset->Add (_x_offset); + add_label_to_sizer (offset, this, _("%"), false); + add_label_to_sizer (offset, this, _("Y"), true); + _y_offset = new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(64, -1)); + offset->Add (_y_offset, 0); + add_label_to_sizer (offset, this, _("%"), false); + grid->Add (offset, wxGBPosition (r, 1)); + ++r; - { - add_label_to_sizer (grid, this, _("Y Scale"), true, wxGBPosition (r, 0)); - wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL); - _y_scale = new wxSpinCtrl (this); - s->Add (_y_scale); - add_label_to_sizer (s, this, _("%"), false); - grid->Add (s, wxGBPosition (r, 1)); - ++r; - } + add_label_to_sizer (grid, this, _("Scale"), true, wxGBPosition (r, 0)); + wxBoxSizer* scale = new wxBoxSizer (wxHORIZONTAL); + add_label_to_sizer (scale, this, _("X"), true); + _x_scale = new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(64, -1)); + scale->Add (_x_scale); + add_label_to_sizer (scale, this, _("%"), false); + add_label_to_sizer (scale, this, _("Y"), true); + _y_scale = new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(64, -1)); + scale->Add (_y_scale, 0); + add_label_to_sizer (scale, this, _("%"), false); + grid->Add (scale, wxGBPosition (r, 1)); + ++r; { add_label_to_sizer (grid, this, _("Line spacing"), true, wxGBPosition (r, 0)); |
