From: Carl Hetherington Date: Mon, 19 Feb 2024 13:41:49 +0000 (+0100) Subject: Fix various preview errors on high-DPI screens (#2774). X-Git-Tag: v2.16.77~2 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=209bbb88cfcb00ca2185583b74066ad7f09ebd81 Fix various preview errors on high-DPI screens (#2774). The logical scale was previously not taken into account so the outline rectangle was wrong and the padding was usually missing. --- diff --git a/src/wx/simple_video_view.cc b/src/wx/simple_video_view.cc index 2a0575f26..cbfd7d4ac 100644 --- a/src/wx/simple_video_view.cc +++ b/src/wx/simple_video_view.cc @@ -75,7 +75,7 @@ SimpleVideoView::paint () auto scale = 1 / dpi_scale_factor (_panel); dc.SetLogicalScale (scale, scale); - auto const panel_size = dcp::Size(_panel->GetSize().GetWidth(), _panel->GetSize().GetHeight()); + auto const panel_size = dcp::Size(_panel->GetSize().GetWidth() / scale, _panel->GetSize().GetHeight() / scale); auto pad = pad_colour(); dcp::Size out_size;