Fix various preview errors on high-DPI screens (#2774).
authorCarl Hetherington <cth@carlh.net>
Mon, 19 Feb 2024 13:41:49 +0000 (14:41 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 19 Feb 2024 13:41:49 +0000 (14:41 +0100)
The logical scale was previously not taken into account so the outline
rectangle was wrong and the padding was usually missing.

src/wx/simple_video_view.cc

index 2a0575f2609f6e14077998607586ec4811292f12..cbfd7d4aca2214d6db187c5b988561abf0c4b778 100644 (file)
@@ -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;