macOS: set dpr on pixmap returned by grabWindow()
This matches the behavior of QScreen::grabWindow(), and gives the caller direct access to the scale factor. Change-Id: Ia3ed165a62eaa0f386f8b508ea6b1128ba6be604 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
8802826de6
commit
ae5f440c33
|
|
@ -466,6 +466,7 @@ QPixmap QCocoaScreen::grabWindow(WId window, int x, int y, int width, int height
|
|||
|
||||
const qreal dpr = devicePixelRatio();
|
||||
QPixmap windowPixmap(windowSize * dpr);
|
||||
windowPixmap.setDevicePixelRatio(dpr);
|
||||
windowPixmap.fill(Qt::transparent);
|
||||
|
||||
for (uint i = 0; i < displayCount; ++i) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue