Make grabWindow return pixmap with correct dpr
The devicePixelRatio on the returned pixmap should be the product of the Qt and platform scale factors. This handles the corner case of setting QT_SCALE_FACTOR on macOS with a high-dpi display. Change-Id: I3600165d47c03c4e043bcc5e375932cc3fc0c544 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
fbbe8aba9d
commit
8802826de6
|
|
@ -748,7 +748,7 @@ QPixmap QScreen::grabWindow(WId window, int x, int y, int width, int height)
|
|||
QPixmap result =
|
||||
platformScreen->grabWindow(window, nativePos.x(), nativePos.y(),
|
||||
nativeSize.width(), nativeSize.height());
|
||||
result.setDevicePixelRatio(factor);
|
||||
result.setDevicePixelRatio(result.devicePixelRatio() * factor);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue