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
parent
feff56827b
commit
1a0384cb15
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue