Commit c80ed93
committed
Set device pixel ratio for grim screenshot
Grim returns a bitmap with the physical size of the screen.
This needs to be scaled back to be displayed as underlay for Flameshot
on screens where logical size differs from the physical size (i.e. scale is active).
In order to do this, set the device pixel ratio, see
<https://doc.qt.io/qt-5/qpixmap.html#setDevicePixelRatio>.
Please note that this works only properly with integer scale.
`QScreen::devicePixelRatio()` rounds when fractional scale is active
on Wayland.1 parent 5f30631 commit c80ed93
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
0 commit comments