summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-09-18 01:11:35 +0100
committerCarl Hetherington <cth@carlh.net>2018-09-18 01:11:35 +0100
commitb21103a67ef8e0e53b338b16da87ca445ba166d1 (patch)
tree7df9aa6d3d7f6aa56bc306284e3a17d14d4b99b4 /src/wx
parente853aeb50f1a16d534b1174b5863e4da238dd1cb (diff)
Vertically-centre playback.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/film_viewer.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index d5d391a80..86805f146 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -317,7 +317,7 @@ FilmViewer::paint_panel ()
wxImage frame (_out_size.width, _out_size.height, _frame->data()[0], true);
wxBitmap frame_bitmap (frame);
- dc.DrawBitmap (frame_bitmap, 0, 0);
+ dc.DrawBitmap (frame_bitmap, 0, max(0, (_panel_size.height - _out_size.height) / 2));
if (_out_size.width < _panel_size.width) {
wxPen p (_panel->GetParent()->GetBackgroundColour());
@@ -332,7 +332,9 @@ FilmViewer::paint_panel ()
wxBrush b (_panel->GetParent()->GetBackgroundColour());
dc.SetPen (p);
dc.SetBrush (b);
- dc.DrawRectangle (0, _out_size.height, _panel_size.width, _panel_size.height - _out_size.height);
+ int const gap = (_panel_size.height - _out_size.height) / 2;
+ dc.DrawRectangle (0, gap, _panel_size.width, gap);
+ dc.DrawRectangle (0, gap + _out_size.height, _panel_size.width, gap);
}
if (_outline_content) {