From bce88478c47731eca702d65fc0baaf88d44855ce Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Sun, 2 May 2021 15:50:55 -0700 Subject: [PATCH] Fix inspector window rendering with device scaling --- rtgui/inspector.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rtgui/inspector.cc b/rtgui/inspector.cc index e0da8378e..c8d9c8bd2 100644 --- a/rtgui/inspector.cc +++ b/rtgui/inspector.cc @@ -485,9 +485,13 @@ bool Inspector::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) else { // consider device scale and image scale if (deviceScale > 1) { +#ifdef __APPLE__ // use full device resolution and let it scale the image (macOS) cairo_surface_set_device_scale(cr->get_target()->cobj(), scale, scale); scaledImage = false; +#else + cr->scale(1. / deviceScale, 1. / deviceScale); +#endif } int viewW = rtengine::min(imW, ceil(availableSize.x + (topLeft.x - topLeftInt.x))); int viewH = rtengine::min(imH, ceil(availableSize.y + (topLeft.y - topLeftInt.y)));