Try to fix problems with view of padded stuff.
authorCarl Hetherington <cth@carlh.net>
Wed, 10 Apr 2013 10:38:05 +0000 (11:38 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 10 Apr 2013 10:38:05 +0000 (11:38 +0100)
src/wx/film_viewer.cc
src/wx/film_viewer.h

index 4dca5cad85223f17e26ea1cc541fa76c0c2ea76b..18ddf1eb2cb585c351ec075de2dffd720abeb43e 100644 (file)
@@ -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);
        }               
 }
 
index f89269d2b32c68ebe6762fbc64d51116bdf431a4..784434f6b60c2a198ce4c29edbd97575eba5b475 100644 (file)
@@ -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;