diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-09-06 00:09:51 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-09-06 00:09:51 +0200 |
| commit | 4cff4f2cb09685d8e5d4a0fafe43089bca9441d1 (patch) | |
| tree | 392fc4a9386b8119f1dc0b9d1d747ac14cb637f6 /src | |
| parent | 78cc2db4d8899ae22ccc96db5012b33a00d394fc (diff) | |
Cleanup: assume DCPOMATIC_SPIN_CTRL_WIDTH.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/dcpomatic_editor.cc | 4 | ||||
| -rw-r--r-- | src/wx/auto_crop_dialog.cc | 10 | ||||
| -rw-r--r-- | src/wx/dcp_panel.cc | 4 | ||||
| -rw-r--r-- | src/wx/dcp_timeline.cc | 2 | ||||
| -rw-r--r-- | src/wx/dcpomatic_spin_ctrl.cc | 7 | ||||
| -rw-r--r-- | src/wx/dcpomatic_spin_ctrl.h | 2 | ||||
| -rw-r--r-- | src/wx/text_panel.cc | 10 |
7 files changed, 20 insertions, 19 deletions
diff --git a/src/tools/dcpomatic_editor.cc b/src/tools/dcpomatic_editor.cc index 1cb79681d..3b19bd5b6 100644 --- a/src/tools/dcpomatic_editor.cc +++ b/src/tools/dcpomatic_editor.cc @@ -87,12 +87,12 @@ public: ++r; add_label_to_sizer(sizer, this, _("Entry point"), true, wxGBPosition(r, 0)); - _entry_point = new SpinCtrl(this, DCPOMATIC_SPIN_CTRL_WIDTH); + _entry_point = new SpinCtrl(this); sizer->Add(_entry_point, wxGBPosition(r, 1), wxDefaultSpan); ++r; add_label_to_sizer(sizer, this, _("Duration"), true, wxGBPosition(r, 0)); - _duration = new SpinCtrl(this, DCPOMATIC_SPIN_CTRL_WIDTH); + _duration = new SpinCtrl(this); sizer->Add(_duration, wxGBPosition(r, 1), wxDefaultSpan); ++r; diff --git a/src/wx/auto_crop_dialog.cc b/src/wx/auto_crop_dialog.cc index 15beecad8..f95aea559 100644 --- a/src/wx/auto_crop_dialog.cc +++ b/src/wx/auto_crop_dialog.cc @@ -29,15 +29,15 @@ AutoCropDialog::AutoCropDialog(wxWindow* parent, Crop crop) : TableDialog(parent, _("Auto crop"), 2, 1, true) { add(_("Left"), true); - _left = add(new SpinCtrl(this, DCPOMATIC_SPIN_CTRL_WIDTH)); + _left = add(new SpinCtrl(this)); add(_("Right"), true); - _right = add(new SpinCtrl(this, DCPOMATIC_SPIN_CTRL_WIDTH)); + _right = add(new SpinCtrl(this)); add(_("Top"), true); - _top = add(new SpinCtrl(this, DCPOMATIC_SPIN_CTRL_WIDTH)); + _top = add(new SpinCtrl(this)); add(_("Bottom"), true); - _bottom = add(new SpinCtrl(this, DCPOMATIC_SPIN_CTRL_WIDTH)); + _bottom = add(new SpinCtrl(this)); add(_("Threshold"), true); - _threshold = add(new SpinCtrl(this, DCPOMATIC_SPIN_CTRL_WIDTH)); + _threshold = add(new SpinCtrl(this)); _left->SetRange(0, 4096); _right->SetRange(0, 4096); diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc index 7582ba0fa..80caa4c2c 100644 --- a/src/wx/dcp_panel.cc +++ b/src/wx/dcp_panel.cc @@ -820,13 +820,13 @@ DCPPanel::make_video_panel() _frame_rate_label = create_label(panel, _("Frame Rate"), true); _frame_rate_choice = new Choice(panel); - _frame_rate_spin = new SpinCtrl(panel, DCPOMATIC_SPIN_CTRL_WIDTH); + _frame_rate_spin = new SpinCtrl(panel); _best_frame_rate = new Button(panel, _("Use best")); _three_d = new CheckBox(panel, _("3D")); _video_bit_rate_label = create_label(panel, _("Video bit rate\nfor newly-encoded data"), true); - _video_bit_rate = new SpinCtrl(panel, DCPOMATIC_SPIN_CTRL_WIDTH); + _video_bit_rate = new SpinCtrl(panel); _mbits_label = create_label(panel, _("Mbit/s"), false); _reencode_j2k = new CheckBox(panel, _("Re-encode JPEG2000 data from input")); diff --git a/src/wx/dcp_timeline.cc b/src/wx/dcp_timeline.cc index 6ea91a060..dc0265127 100644 --- a/src/wx/dcp_timeline.cc +++ b/src/wx/dcp_timeline.cc @@ -301,7 +301,7 @@ DCPTimeline::setup_reel_settings() ++r; add_label_to_sizer(sizer, _reel_settings, _("Maximum reel size"), true, wxGBPosition(r, 0)); - _maximum_reel_size = new SpinCtrl(_reel_settings, DCPOMATIC_SPIN_CTRL_WIDTH); + _maximum_reel_size = new SpinCtrl(_reel_settings); _maximum_reel_size->SetRange(1, 1000); { auto s = new wxBoxSizer(wxHORIZONTAL); diff --git a/src/wx/dcpomatic_spin_ctrl.cc b/src/wx/dcpomatic_spin_ctrl.cc index 70bd7e3f7..fa1692d58 100644 --- a/src/wx/dcpomatic_spin_ctrl.cc +++ b/src/wx/dcpomatic_spin_ctrl.cc @@ -20,6 +20,7 @@ #include "dcpomatic_spin_ctrl.h" +#include "wx_util.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/wx.h> @@ -33,12 +34,12 @@ using namespace boost::placeholders; #endif -SpinCtrl::SpinCtrl (wxWindow* parent, int width) - : wxSpinCtrl (parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(width, -1), wxSP_ARROW_KEYS | wxTE_PROCESS_ENTER) +SpinCtrl::SpinCtrl(wxWindow* parent) + : wxSpinCtrl(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(DCPOMATIC_SPIN_CTRL_WIDTH, -1), wxSP_ARROW_KEYS | wxTE_PROCESS_ENTER) { auto enter = [](wxCommandEvent& ev) { dynamic_cast<wxWindow*>(ev.GetEventObject())->Navigate(); }; - Bind (wxEVT_TEXT_ENTER, boost::bind<void>(enter, _1)); + Bind(wxEVT_TEXT_ENTER, boost::bind<void>(enter, _1)); } diff --git a/src/wx/dcpomatic_spin_ctrl.h b/src/wx/dcpomatic_spin_ctrl.h index 4a673ff93..aaa8de9a5 100644 --- a/src/wx/dcpomatic_spin_ctrl.h +++ b/src/wx/dcpomatic_spin_ctrl.h @@ -33,7 +33,7 @@ LIBDCP_ENABLE_WARNINGS class SpinCtrl : public wxSpinCtrl { public: - SpinCtrl (wxWindow* parent, int width); + SpinCtrl(wxWindow* parent); }; diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index 849e83294..6fef885f1 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -87,22 +87,22 @@ TextPanel::create () _offset_label = create_label (this, _("Offset"), true); _x_offset_label = create_label (this, _("X"), true); - _x_offset = new SpinCtrl (this, DCPOMATIC_SPIN_CTRL_WIDTH); + _x_offset = new SpinCtrl(this); _x_offset_pc_label = new StaticText (this, _("%")); _y_offset_label = create_label (this, _("Y"), true); - _y_offset = new SpinCtrl (this, DCPOMATIC_SPIN_CTRL_WIDTH); + _y_offset = new SpinCtrl(this); _y_offset_pc_label = new StaticText (this, _("%")); _scale_label = create_label (this, _("Scale"), true); _x_scale_label = create_label (this, _("X"), true); - _x_scale = new SpinCtrl (this, DCPOMATIC_SPIN_CTRL_WIDTH); + _x_scale = new SpinCtrl(this); _x_scale_pc_label = new StaticText (this, _("%")); _y_scale_label = create_label (this, S_("Coord|Y"), true); - _y_scale = new SpinCtrl (this, DCPOMATIC_SPIN_CTRL_WIDTH); + _y_scale = new SpinCtrl(this); _y_scale_pc_label = new StaticText (this, _("%")); _line_spacing_label = create_label (this, _("Line spacing"), true); - _line_spacing = new SpinCtrl (this, DCPOMATIC_SPIN_CTRL_WIDTH); + _line_spacing = new SpinCtrl(this); _line_spacing_pc_label = new StaticText (this, _("%")); _stream_label = create_label (this, _("Stream"), true); |
