Set device pixel ratio for window decorations on scaled windows

Change-Id: I40d96362131124effd9405cdad4e3dea79e6ebe3
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
This commit is contained in:
Johan Klokkhammer Helsing 2016-06-08 13:19:14 +02:00 committed by Johan Helsing
parent 477e7e844c
commit fe52b009f3

View File

@ -104,7 +104,10 @@ const QImage &QWaylandAbstractDecoration::contentImage()
if (d->m_isDirty) {
//Update the decoration backingstore
d->m_decorationContentImage = QImage(window()->frameGeometry().size(), QImage::Format_ARGB32_Premultiplied);
const int scale = waylandWindow()->scale();
const QSize imageSize = window()->frameGeometry().size() * scale;
d->m_decorationContentImage = QImage(imageSize, QImage::Format_ARGB32_Premultiplied);
d->m_decorationContentImage.setDevicePixelRatio(scale);
d->m_decorationContentImage.fill(Qt::transparent);
this->paint(&d->m_decorationContentImage);