diff --git a/src/plugins/scenes/opengl/scene_opengl.cpp b/src/plugins/scenes/opengl/scene_opengl.cpp index ea9533592c..db52c74ce7 100644 --- a/src/plugins/scenes/opengl/scene_opengl.cpp +++ b/src/plugins/scenes/opengl/scene_opengl.cpp @@ -916,7 +916,7 @@ void OpenGLWindow::createRenderNode(Item *item, RenderContext *context) .transformMatrix = context->transforms.top(), .opacity = context->paintData.opacity(), .hasAlpha = true, - .coordinateType = NormalizedCoordinates, + .coordinateType = UnnormalizedCoordinates, }); } } else if (auto decorationItem = qobject_cast(item)) { diff --git a/src/shadowitem.cpp b/src/shadowitem.cpp index 0f14d754d5..696a165f26 100644 --- a/src/shadowitem.cpp +++ b/src/shadowitem.cpp @@ -164,8 +164,8 @@ WindowQuadList ShadowItem::buildQuads() const if (topLeftRect.isValid()) { tx1 = 0.0; ty1 = 0.0; - tx2 = topLeftRect.width() / width; - ty2 = topLeftRect.height() / height; + tx2 = topLeftRect.width(); + ty2 = topLeftRect.height(); WindowQuad topLeftQuad; topLeftQuad[0] = WindowVertex(topLeftRect.left(), topLeftRect.top(), tx1, ty1); topLeftQuad[1] = WindowVertex(topLeftRect.right(), topLeftRect.top(), tx2, ty1); @@ -175,10 +175,10 @@ WindowQuadList ShadowItem::buildQuads() const } if (topRightRect.isValid()) { - tx1 = 1.0 - topRightRect.width() / width; + tx1 = width - topRightRect.width(); ty1 = 0.0; - tx2 = 1.0; - ty2 = topRightRect.height() / height; + tx2 = width; + ty2 = topRightRect.height(); WindowQuad topRightQuad; topRightQuad[0] = WindowVertex(topRightRect.left(), topRightRect.top(), tx1, ty1); topRightQuad[1] = WindowVertex(topRightRect.right(), topRightRect.top(), tx2, ty1); @@ -188,10 +188,10 @@ WindowQuadList ShadowItem::buildQuads() const } if (bottomRightRect.isValid()) { - tx1 = 1.0 - bottomRightRect.width() / width; - tx2 = 1.0; - ty1 = 1.0 - bottomRightRect.height() / height; - ty2 = 1.0; + tx1 = width - bottomRightRect.width(); + tx2 = width; + ty1 = height - bottomRightRect.height(); + ty2 = height; WindowQuad bottomRightQuad; bottomRightQuad[0] = WindowVertex(bottomRightRect.left(), bottomRightRect.top(), tx1, ty1); bottomRightQuad[1] = WindowVertex(bottomRightRect.right(), bottomRightRect.top(), tx2, ty1); @@ -202,9 +202,9 @@ WindowQuadList ShadowItem::buildQuads() const if (bottomLeftRect.isValid()) { tx1 = 0.0; - tx2 = bottomLeftRect.width() / width; - ty1 = 1.0 - bottomLeftRect.height() / height; - ty2 = 1.0; + tx2 = bottomLeftRect.width(); + ty1 = height - bottomLeftRect.height(); + ty2 = height; WindowQuad bottomLeftQuad; bottomLeftQuad[0] = WindowVertex(bottomLeftRect.left(), bottomLeftRect.top(), tx1, ty1); bottomLeftQuad[1] = WindowVertex(bottomLeftRect.right(), bottomLeftRect.top(), tx2, ty1); @@ -234,10 +234,10 @@ WindowQuadList ShadowItem::buildQuads() const distributeVertically(topRect, bottomRect); if (topRect.isValid()) { - tx1 = shadowMargins.left() / width; + tx1 = shadowMargins.left(); ty1 = 0.0; - tx2 = tx1 + top.width() / width; - ty2 = topRect.height() / height; + tx2 = tx1 + top.width(); + ty2 = topRect.height(); WindowQuad topQuad; topQuad[0] = WindowVertex(topRect.left(), topRect.top(), tx1, ty1); topQuad[1] = WindowVertex(topRect.right(), topRect.top(), tx2, ty1); @@ -247,10 +247,10 @@ WindowQuadList ShadowItem::buildQuads() const } if (rightRect.isValid()) { - tx1 = 1.0 - rightRect.width() / width; - ty1 = shadowMargins.top() / height; - tx2 = 1.0; - ty2 = ty1 + right.height() / height; + tx1 = width - rightRect.width(); + ty1 = shadowMargins.top(); + tx2 = width; + ty2 = ty1 + right.height(); WindowQuad rightQuad; rightQuad[0] = WindowVertex(rightRect.left(), rightRect.top(), tx1, ty1); rightQuad[1] = WindowVertex(rightRect.right(), rightRect.top(), tx2, ty1); @@ -260,10 +260,10 @@ WindowQuadList ShadowItem::buildQuads() const } if (bottomRect.isValid()) { - tx1 = shadowMargins.left() / width; - ty1 = 1.0 - bottomRect.height() / height; - tx2 = tx1 + bottom.width() / width; - ty2 = 1.0; + tx1 = shadowMargins.left(); + ty1 = height - bottomRect.height(); + tx2 = tx1 + bottom.width(); + ty2 = height; WindowQuad bottomQuad; bottomQuad[0] = WindowVertex(bottomRect.left(), bottomRect.top(), tx1, ty1); bottomQuad[1] = WindowVertex(bottomRect.right(), bottomRect.top(), tx2, ty1); @@ -274,9 +274,9 @@ WindowQuadList ShadowItem::buildQuads() const if (leftRect.isValid()) { tx1 = 0.0; - ty1 = shadowMargins.top() / height; - tx2 = leftRect.width() / width; - ty2 = ty1 + left.height() / height; + ty1 = shadowMargins.top(); + tx2 = leftRect.width(); + ty2 = ty1 + left.height(); WindowQuad leftQuad; leftQuad[0] = WindowVertex(leftRect.left(), leftRect.top(), tx1, ty1); leftQuad[1] = WindowVertex(leftRect.right(), leftRect.top(), tx2, ty1);