From ae72f61a4a8d9b08c9fa4808c3b0e32a5217ee72 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 6 Mar 2023 12:32:06 +0200 Subject: [PATCH] scene: Use correct scale when computing world transform If render target scale is set in WindowPaintData, use it. Otherwise window screenshots with logical geometry can look wrong. --- src/scene/itemrenderer_opengl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scene/itemrenderer_opengl.cpp b/src/scene/itemrenderer_opengl.cpp index 7d48824dd9..d197982039 100644 --- a/src/scene/itemrenderer_opengl.cpp +++ b/src/scene/itemrenderer_opengl.cpp @@ -262,7 +262,7 @@ void ItemRendererOpenGL::renderItem(Item *item, int mask, const QRegion ®ion, renderContext.transformStack.push(QMatrix4x4()); renderContext.opacityStack.push(data.opacity()); - item->setTransform(data.toMatrix(renderTargetScale())); + item->setTransform(data.toMatrix(renderContext.renderTargetScale)); createRenderNode(item, &renderContext);