diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-12-08 19:31:28 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-12-08 19:31:28 +0100 |
| commit | 83a78961d8fbd336361f573c6d9efde720f9c0c0 (patch) | |
| tree | 5dc886a715334e3d76d19d60b06e817147d0f9fa /src | |
| parent | affe77ecf29d77dabee1538551ef78ee0ed89d0c (diff) | |
Fix crop control alignment on macOS (#1864).
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/content_widget.h | 4 | ||||
| -rw-r--r-- | src/wx/video_panel.cc | 21 |
2 files changed, 15 insertions, 10 deletions
diff --git a/src/wx/content_widget.h b/src/wx/content_widget.h index 52a5e5851..6505d08da 100644 --- a/src/wx/content_widget.h +++ b/src/wx/content_widget.h @@ -117,12 +117,12 @@ public: } /** Add this widget to a wxGridBagSizer */ - void add (wxGridBagSizer* sizer, wxGBPosition position, wxGBSpan span = wxDefaultSpan) + void add (wxGridBagSizer* sizer, wxGBPosition position, wxGBSpan span = wxDefaultSpan, int flag = 0) { _sizer = sizer; _position = position; _span = span; - _sizer->Add (_wrapped, _position, _span); + _sizer->Add (_wrapped, _position, _span, flag); } /** Update the view from the model */ diff --git a/src/wx/video_panel.cc b/src/wx/video_panel.cc index e58c8e4f5..f5e514fab 100644 --- a/src/wx/video_panel.cc +++ b/src/wx/video_panel.cc @@ -86,10 +86,14 @@ VideoPanel::VideoPanel (ContentPanel* p) _crop_label = create_label (this, _("Crop"), true); -#ifdef __WXGTK3__ +#if defined(__WXGTK3__) int const crop_width = 128; int const link_width = 32; int const link_height = 64; +#elif defined(DCPOMATIC_OSX) + int const crop_width = 56; + int const link_width = 24; + int const link_height = 28; #else int const crop_width = 56; int const link_width = 22; @@ -231,30 +235,31 @@ VideoPanel::add_to_grid () int cr = 0; wxGridBagSizer* crop = new wxGridBagSizer (DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); + add_label_to_sizer (crop, _left_crop_label, true, wxGBPosition (cr, 0)); - _left_crop->add (crop, wxGBPosition (cr, 1)); + _left_crop->add (crop, wxGBPosition(cr, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL); #ifdef __WXGTK3__ crop->Add (_left_right_link, wxGBPosition(cr, 2), wxGBSpan(2, 1)); ++cr; add_label_to_sizer (crop, _right_crop_label, true, wxGBPosition(cr, 0)); _right_crop->add (crop, wxGBPosition(cr, 1)); #else - crop->Add (_left_right_link, wxGBPosition(cr, 2)); + crop->Add (_left_right_link, wxGBPosition(cr, 2), wxDefaultSpan, wxALIGN_CENTER_VERTICAL); add_label_to_sizer (crop, _right_crop_label, true, wxGBPosition (cr, 3)); - _right_crop->add (crop, wxGBPosition (cr, 4)); + _right_crop->add (crop, wxGBPosition (cr, 4), wxDefaultSpan, wxALIGN_CENTER_VERTICAL); #endif ++cr; add_label_to_sizer (crop, _top_crop_label, true, wxGBPosition (cr, 0)); - _top_crop->add (crop, wxGBPosition (cr, 1)); + _top_crop->add (crop, wxGBPosition (cr, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL); #ifdef __WXGTK3__ crop->Add (_top_bottom_link, wxGBPosition(cr, 2), wxGBSpan(2, 1)); ++cr; add_label_to_sizer (crop, _bottom_crop_label, true, wxGBPosition(cr, 0)); - _bottom_crop->add (crop, wxGBPosition(cr, 1)); + _bottom_crop->add (crop, wxGBPosition(cr, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL); #else - crop->Add (_top_bottom_link, wxGBPosition(cr, 2)); + crop->Add (_top_bottom_link, wxGBPosition(cr, 2), wxDefaultSpan, wxALIGN_CENTER_VERTICAL); add_label_to_sizer (crop, _bottom_crop_label, true, wxGBPosition (cr, 3)); - _bottom_crop->add (crop, wxGBPosition (cr, 4)); + _bottom_crop->add (crop, wxGBPosition (cr, 4), wxDefaultSpan, wxALIGN_CENTER_VERTICAL); #endif add_label_to_sizer (_grid, _crop_label, true, wxGBPosition(r, 0)); _grid->Add (crop, wxGBPosition(r, 1)); |
