diff options
Diffstat (limited to 'src/wx/gl_video_view.cc')
| -rw-r--r-- | src/wx/gl_video_view.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc index 877cd5125..559cff413 100644 --- a/src/wx/gl_video_view.cc +++ b/src/wx/gl_video_view.cc @@ -103,12 +103,15 @@ GLVideoView::GLVideoView (FilmViewer* viewer, wxWindow *parent) void GLVideoView::size_changed (wxSizeEvent const& ev) { - _canvas_size = ev.GetSize (); + auto const scale = _canvas->GetDPIScaleFactor(); + int const width = std::round(ev.GetSize().GetWidth() * scale); + int const height = std::round(ev.GetSize().GetHeight() * scale); + _canvas_size = { width, height }; + LOG_GENERAL("GLVideoView canvas size changed to %1x%2", width, height); Sized (); } - GLVideoView::~GLVideoView () { boost::this_thread::disable_interruption dis; |
