Commit 9e0f8467 authored by David Edmundson's avatar David Edmundson
Browse files

Set preview to correct device size

QQuickImage::sourceSize is in device pixels for pixmap images.

Converting is the responsibility of the calling code.

BUG: 407689

Test Plan:
QT_SCALE_FACTOR=1.5 kcmshell5 sddm
Looked at image

Reviewers: #plasma, apol

Reviewed By: apol

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision:
parent 8a9d7e9d
......@@ -16,6 +16,7 @@
along with this program. If not, see <>.
import QtQuick 2.4
import QtQuick.Window 2.2
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.4
import org.kde.kirigami 2.4 as Kirigami
......@@ -51,8 +52,8 @@ Rectangle {
readonly property bool available: status === Image.Ready || status === Image.Loading
visible: available
source: previewPath
sourceSize.width: width
sourceSize.height: height
sourceSize.width: width * Screen.devicePixelRatio
sourceSize.height: height * Screen.devicePixelRatio
anchors {
left: root.left
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment