diff --git a/plugins/scenes/opengl/scene_opengl.cpp b/plugins/scenes/opengl/scene_opengl.cpp index 967c642729..a69f3f2fca 100644 --- a/plugins/scenes/opengl/scene_opengl.cpp +++ b/plugins/scenes/opengl/scene_opengl.cpp @@ -2471,17 +2471,17 @@ bool SceneOpenGLShadow::prepareBackend() QPainter p; p.begin(&image); - p.drawPixmap(0, 0, shadowPixmap(ShadowElementTopLeft)); - p.drawPixmap(innerRectLeft, 0, shadowPixmap(ShadowElementTop)); - p.drawPixmap(width - topRight.width(), 0, shadowPixmap(ShadowElementTopRight)); + p.drawPixmap(0, 0, topLeft.width(), topLeft.height(), shadowPixmap(ShadowElementTopLeft)); + p.drawPixmap(innerRectLeft, 0, top.width(), top.height(), shadowPixmap(ShadowElementTop)); + p.drawPixmap(width - topRight.width(), 0, topRight.width(), topRight.height(), shadowPixmap(ShadowElementTopRight)); - p.drawPixmap(0, innerRectTop, shadowPixmap(ShadowElementLeft)); - p.drawPixmap(width - right.width(), innerRectTop, shadowPixmap(ShadowElementRight)); - - p.drawPixmap(0, height - bottomLeft.height(), shadowPixmap(ShadowElementBottomLeft)); - p.drawPixmap(innerRectLeft, height - bottom.height(), shadowPixmap(ShadowElementBottom)); - p.drawPixmap(width - bottomRight.width(), height - bottomRight.height(), shadowPixmap(ShadowElementBottomRight)); + p.drawPixmap(0, innerRectTop, left.width(), left.height(), shadowPixmap(ShadowElementLeft)); + p.drawPixmap(width - right.width(), innerRectTop, right.width(), right.height(), shadowPixmap(ShadowElementRight)); + p.drawPixmap(0, height - bottomLeft.height(), bottomLeft.width(), bottomLeft.height(), shadowPixmap(ShadowElementBottomLeft)); + p.drawPixmap(innerRectLeft, height - bottom.height(), bottom.width(), bottom.height(), shadowPixmap(ShadowElementBottom)); + p.drawPixmap(width - bottomRight.width(), height - bottomRight.height(), bottomRight.width(), bottomRight.height(), shadowPixmap(ShadowElementBottomRight)); + p.end(); // Check if the image is alpha-only in practice, and if so convert it to an 8-bpp format diff --git a/plugins/scenes/qpainter/scene_qpainter.cpp b/plugins/scenes/qpainter/scene_qpainter.cpp index 43313eb1fc..6fb5883497 100644 --- a/plugins/scenes/qpainter/scene_qpainter.cpp +++ b/plugins/scenes/qpainter/scene_qpainter.cpp @@ -764,14 +764,14 @@ bool SceneQPainterShadow::prepareBackend() QPainter painter; painter.begin(&image); - painter.drawPixmap(0, 0, topLeft); - painter.drawPixmap(topLeft.width(), 0, top); - painter.drawPixmap(width - topRight.width(), 0, topRight); - painter.drawPixmap(0, height - bottomLeft.height(), bottomLeft); - painter.drawPixmap(bottomLeft.width(), height - bottom.height(), bottom); - painter.drawPixmap(width - bottomRight.width(), height - bottomRight.height(), bottomRight); - painter.drawPixmap(0, topLeft.height(), left); - painter.drawPixmap(width - right.width(), topRight.height(), right); + painter.drawPixmap(0, 0, topLeft.width(), topLeft.height(), topLeft); + painter.drawPixmap(topLeft.width(), 0, top.width(), top.height(), top); + painter.drawPixmap(width - topRight.width(), 0, topRight.width(), topRight.height(), topRight); + painter.drawPixmap(0, height - bottomLeft.height(), bottomLeft.width(), bottomLeft.height(), bottomLeft); + painter.drawPixmap(bottomLeft.width(), height - bottom.height(), bottom.width(), bottom.height(), bottom); + painter.drawPixmap(width - bottomRight.width(), height - bottomRight.height(), bottomRight.width(), bottomRight.height(), bottomRight); + painter.drawPixmap(0, topLeft.height(), left.width(), left.height(), left); + painter.drawPixmap(width - right.width(), topRight.height(), right.width(), right.height(), right); painter.end(); m_texture = image;