Support device pixel ratio in QWidget graphic effects

Change-Id: Ie20bd30328ae353ace82fbeee5808546f0568703
Reviewed-by: Christoph Cullmann <cullmann@kde.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
bb10
David Edmundson 2015-08-16 15:09:51 +01:00 committed by Morten Johan Sørvig
parent feff56827b
commit 1a0384cb15
1 changed files with 4 additions and 1 deletions

View File

@ -5828,7 +5828,10 @@ QPixmap QWidgetEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QPoint *
pixmapOffset -= effectRect.topLeft();
QPixmap pixmap(effectRect.size());
const qreal dpr = context->painter->device()->devicePixelRatio();
QPixmap pixmap(effectRect.size() * dpr);
pixmap.setDevicePixelRatio(dpr);
pixmap.fill(Qt::transparent);
m_widget->render(&pixmap, pixmapOffset, QRegion(), QWidget::DrawChildren);
return pixmap;