diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-04-10 11:38:05 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-04-10 11:38:05 +0100 |
| commit | 62f86da8d2b0daa2237e33653a3e837e6f395573 (patch) | |
| tree | b637a7de7df1e75eae9cc02140ebf4f2f08bb90a /src | |
| parent | 8641190aa2a2f071850e2db1f5b54716fffa775a (diff) | |
Try to fix problems with view of padded stuff.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/film_viewer.cc | 8 | ||||
| -rw-r--r-- | src/wx/film_viewer.h | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 4dca5cad8..18ddf1eb2 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -222,20 +222,20 @@ FilmViewer::paint_panel (wxPaintEvent &) dc.DrawBitmap (sub_bitmap, _display_sub_position.x, _display_sub_position.y); } - if (_film_size.width < _panel_size.width) { + if (_out_size.width < _panel_size.width) { wxPen p (GetBackgroundColour ()); wxBrush b (GetBackgroundColour ()); dc.SetPen (p); dc.SetBrush (b); - dc.DrawRectangle (_film_size.width, 0, _panel_size.width - _film_size.width, _panel_size.height); + dc.DrawRectangle (_out_size.width, 0, _panel_size.width - _out_size.width, _panel_size.height); } - if (_film_size.height < _panel_size.height) { + if (_out_size.height < _panel_size.height) { wxPen p (GetBackgroundColour ()); wxBrush b (GetBackgroundColour ()); dc.SetPen (p); dc.SetBrush (b); - dc.DrawRectangle (0, _film_size.height, _panel_size.width, _panel_size.height - _film_size.height); + dc.DrawRectangle (0, _out_size.height, _panel_size.width, _panel_size.height - _out_size.height); } } diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h index f89269d2b..784434f6b 100644 --- a/src/wx/film_viewer.h +++ b/src/wx/film_viewer.h @@ -69,6 +69,9 @@ private: boost::shared_ptr<Image> _raw_frame; boost::shared_ptr<Subtitle> _raw_sub; boost::shared_ptr<Image> _display_frame; + /* The x offset at which we display the actual film content; this corresponds + to the film's padding converted to our coordinates. + */ int _display_frame_x; boost::shared_ptr<RGBPlusAlphaImage> _display_sub; Position _display_sub_position; |
