C++11 tidying.
[dcpomatic.git] / src / wx / simple_video_view.cc
index cd138e2393bff7d581584618d3f419d243fe0507..a31d823a99682d9f5dd0e87f6a0f64f9ced9cd62 100644 (file)
@@ -75,14 +75,7 @@ SimpleVideoView::paint ()
                dc.DrawBitmap (frame_bitmap, 0, max(0, (panel_size.GetHeight() - out_size.height) / 2));
        }
 
-#ifdef DCPOMATIC_OSX
-       auto appearance = wxSystemSettings::GetAppearance();
-       auto dark = appearance.IsDark();
-#else
-       auto dark = false;
-#endif
-
-       auto const pad_colour = (_viewer->pad_black() || dark) ? wxColour(0, 0, 0) : wxColour(240, 240, 240);
+       auto const pad_colour = (_viewer->pad_black() || gui_is_dark()) ? wxColour(0, 0, 0) : wxColour(240, 240, 240);
 
        if (out_size.width < panel_size.GetWidth()) {
                wxPen   p (pad_colour);
@@ -109,7 +102,7 @@ SimpleVideoView::paint ()
                dc.DrawRectangle (_inter_position.x, _inter_position.y + (panel_size.GetHeight() - out_size.height) / 2, _inter_size.width, _inter_size.height);
        }
 
-       optional<dcpomatic::Rect<double> > subs = _viewer->outline_subtitles();
+       auto subs = _viewer->outline_subtitles();
        if (subs) {
                wxPen p (wxColour(0, 255, 0), 2);
                dc.SetPen (p);
@@ -137,7 +130,7 @@ SimpleVideoView::timer ()
        }
 
        display_next_frame (false);
-       DCPTime const next = position() + _viewer->one_video_frame();
+       auto const next = position() + _viewer->one_video_frame();
 
        if (next >= length()) {
                _viewer->finished ();
@@ -167,7 +160,7 @@ SimpleVideoView::start ()
 VideoView::NextFrameResult
 SimpleVideoView::display_next_frame (bool non_blocking)
 {
-       NextFrameResult const r = get_next_frame (non_blocking);
+       auto const r = get_next_frame (non_blocking);
        if (r != SUCCESS) {
                return r;
        }