Fix incorrect scaling of the simple view with hidpi screens (#2128).
authorCarl Hetherington <cth@carlh.net>
Sat, 20 Nov 2021 21:36:06 +0000 (22:36 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 20 Nov 2021 21:36:06 +0000 (22:36 +0100)
src/wx/simple_video_view.cc

index 1ac56bbfe1f0ca3af029b6840511124af242a630..f4ff9a4ebaea4da93ef57ba8d714953247eca46b 100644 (file)
@@ -65,6 +65,8 @@ SimpleVideoView::paint ()
 {
         _state_timer.set("paint-panel");
        wxPaintDC dc (_panel);
+       auto scale = 1 / dpi_scale_factor (_panel);
+       dc.SetLogicalScale (scale, scale);
 
        auto const panel_size = _panel->GetSize ();