Reformat crop controls.
authorCarl Hetherington <cth@carlh.net>
Sun, 10 May 2020 19:43:24 +0000 (21:43 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 11 May 2020 19:59:27 +0000 (21:59 +0200)
src/wx/video_panel.cc
src/wx/video_panel.h

index 992ddf115b80455e063fe5674952b3f3bcaa73e4..b01e9b8aa894d319b6ed027f47717b2dd0f70fb0 100644 (file)
@@ -102,7 +102,9 @@ VideoPanel::VideoPanel (ContentPanel* p)
                &caster<VideoFrameType, int>
                );
 
                &caster<VideoFrameType, int>
                );
 
-       _left_crop_label = create_label (this, _("Left crop"), true);
+       _crop_label = create_label (this, _("Crop"), true);
+
+       _left_crop_label = create_label (this, _("Left"), true);
        _left_crop = new ContentSpinCtrl<VideoContent> (
                this,
                new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1)),
        _left_crop = new ContentSpinCtrl<VideoContent> (
                this,
                new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1)),
@@ -112,7 +114,7 @@ VideoPanel::VideoPanel (ContentPanel* p)
                boost::mem_fn (&VideoContent::set_left_crop)
                );
 
                boost::mem_fn (&VideoContent::set_left_crop)
                );
 
-       _right_crop_label = create_label (this, _("Right crop"), true);
+       _right_crop_label = create_label (this, _("Right"), true);
        _right_crop = new ContentSpinCtrl<VideoContent> (
                this,
                new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1)),
        _right_crop = new ContentSpinCtrl<VideoContent> (
                this,
                new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1)),
@@ -122,7 +124,7 @@ VideoPanel::VideoPanel (ContentPanel* p)
                boost::mem_fn (&VideoContent::set_right_crop)
                );
 
                boost::mem_fn (&VideoContent::set_right_crop)
                );
 
-       _top_crop_label = create_label (this, _("Top crop"), true);
+       _top_crop_label = create_label (this, _("Top"), true);
        _top_crop = new ContentSpinCtrl<VideoContent> (
                this,
                new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1)),
        _top_crop = new ContentSpinCtrl<VideoContent> (
                this,
                new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1)),
@@ -132,7 +134,7 @@ VideoPanel::VideoPanel (ContentPanel* p)
                boost::mem_fn (&VideoContent::set_top_crop)
                );
 
                boost::mem_fn (&VideoContent::set_top_crop)
                );
 
-       _bottom_crop_label = create_label (this, _("Bottom crop"), true);
+       _bottom_crop_label = create_label (this, _("Bottom"), true);
        _bottom_crop = new ContentSpinCtrl<VideoContent> (
                this,
                new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1)),
        _bottom_crop = new ContentSpinCtrl<VideoContent> (
                this,
                new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1)),
@@ -257,7 +259,8 @@ VideoPanel::add_to_grid ()
        _top_crop->add (crop, wxGBPosition (cr, 1));
        add_label_to_sizer (crop, _bottom_crop_label, true, wxGBPosition (cr, 2));
        _bottom_crop->add (crop, wxGBPosition (cr, 3));
        _top_crop->add (crop, wxGBPosition (cr, 1));
        add_label_to_sizer (crop, _bottom_crop_label, true, wxGBPosition (cr, 2));
        _bottom_crop->add (crop, wxGBPosition (cr, 3));
-       _grid->Add (crop, wxGBPosition (r, 0), wxGBSpan (2, 4));
+       add_label_to_sizer (_grid, _crop_label, true, wxGBPosition(r, 0));
+       _grid->Add (crop, wxGBPosition(r, 1), wxGBSpan(2, 3));
        r += 2;
 
        _scale_to_label->Show (full);
        r += 2;
 
        _scale_to_label->Show (full);
index ad0ba402a763e4a23a9216dc1fc9a80acce45b5a..04063ef54b179a54bcb445e30e34bc8b161bd777 100644 (file)
@@ -64,6 +64,7 @@ private:
        wxCheckBox* _use;
        wxStaticText* _type_label;
        ContentChoice<VideoContent, VideoFrameType>* _frame_type;
        wxCheckBox* _use;
        wxStaticText* _type_label;
        ContentChoice<VideoContent, VideoFrameType>* _frame_type;
+       wxStaticText* _crop_label;
        wxStaticText* _left_crop_label;
        ContentSpinCtrl<VideoContent>* _left_crop;
        wxStaticText* _right_crop_label;
        wxStaticText* _left_crop_label;
        ContentSpinCtrl<VideoContent>* _left_crop;
        wxStaticText* _right_crop_label;