use device pixel ratio on screenshot to properly draw the image

This commit is contained in:
nullobsi
2021-02-02 00:08:29 -08:00
committed by borgmanJeremy
parent b4ba730732
commit 799c4c9908

View File

@@ -112,6 +112,7 @@ QPixmap ScreenGrabber::grabEntireDesktop(bool& ok)
if (status == 0) {
QString uri = map.value("uri").toString().remove(0, 7);
res = QPixmap(uri);
res.setDevicePixelRatio(qApp->devicePixelRatio());
QFile imgFile(uri);
imgFile.remove();
}