Fix inspector window rendering with device scaling
This commit is contained in:
parent
de9403f9fe
commit
bce88478c4
@ -485,9 +485,13 @@ bool Inspector::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr)
|
|||||||
else {
|
else {
|
||||||
// consider device scale and image scale
|
// consider device scale and image scale
|
||||||
if (deviceScale > 1) {
|
if (deviceScale > 1) {
|
||||||
|
#ifdef __APPLE__
|
||||||
// use full device resolution and let it scale the image (macOS)
|
// use full device resolution and let it scale the image (macOS)
|
||||||
cairo_surface_set_device_scale(cr->get_target()->cobj(), scale, scale);
|
cairo_surface_set_device_scale(cr->get_target()->cobj(), scale, scale);
|
||||||
scaledImage = false;
|
scaledImage = false;
|
||||||
|
#else
|
||||||
|
cr->scale(1. / deviceScale, 1. / deviceScale);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
int viewW = rtengine::min<int>(imW, ceil(availableSize.x + (topLeft.x - topLeftInt.x)));
|
int viewW = rtengine::min<int>(imW, ceil(availableSize.x + (topLeft.x - topLeftInt.x)));
|
||||||
int viewH = rtengine::min<int>(imH, ceil(availableSize.y + (topLeft.y - topLeftInt.y)));
|
int viewH = rtengine::min<int>(imH, ceil(availableSize.y + (topLeft.y - topLeftInt.y)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user