Skip to content

Remove device pixel ratio scaling from PixmapRequest

The PixmapRequest constructor expected width and height in logical pixels, and scaled them to device pixels. However, not knowing what screen the request is for, it had to use qApp->devicePixelRatio() for the scaling. That value may not be correct if not all screens use the same scaling.

Fix this by clearly stating that the width/height constructor arguments must be in device pixels now, remove the scaling from the PixmapRequest constructor, and adjust all calling sites.

After this change one of the calling sites still scales with qApp->devicePixelRatio() as before, even though that's probably not appropriate. The reason, the correct device pixel ratio is not readily available at the call site either, and I wanted to keep the commit short.

Merge request reports