From fe52b009f3ea03ef62c447fddcd8597bec1fc9a2 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Wed, 8 Jun 2016 13:19:14 +0200 Subject: [PATCH] Set device pixel ratio for window decorations on scaled windows Change-Id: I40d96362131124effd9405cdad4e3dea79e6ebe3 Reviewed-by: Pier Luigi Fiorini --- src/plugins/platforms/wayland/qwaylandabstractdecoration.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/qwaylandabstractdecoration.cpp b/src/plugins/platforms/wayland/qwaylandabstractdecoration.cpp index 54a990b2d71..98e944365df 100644 --- a/src/plugins/platforms/wayland/qwaylandabstractdecoration.cpp +++ b/src/plugins/platforms/wayland/qwaylandabstractdecoration.cpp @@ -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);