From 799c4c990869c6b68c3d3273efd31cba366a796d Mon Sep 17 00:00:00 2001 From: nullobsi Date: Tue, 2 Feb 2021 00:08:29 -0800 Subject: [PATCH] use device pixel ratio on screenshot to properly draw the image --- src/utils/screengrabber.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/screengrabber.cpp b/src/utils/screengrabber.cpp index 08c45080..de3eb4d8 100644 --- a/src/utils/screengrabber.cpp +++ b/src/utils/screengrabber.cpp @@ -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(); }