From bc4dc313b798374a493a1cadc5664932d51c8e47 Mon Sep 17 00:00:00 2001 From: Bart De Vries Date: Thu, 2 Feb 2023 11:30:22 +0100 Subject: [PATCH] Display high DPI art when using scaling --- src/qml/ImageWithFallback.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qml/ImageWithFallback.qml b/src/qml/ImageWithFallback.qml index 2e875788..881b3b12 100644 --- a/src/qml/ImageWithFallback.qml +++ b/src/qml/ImageWithFallback.qml @@ -1,5 +1,5 @@ /** - * SPDX-FileCopyrightText: 2021 Bart De Vries + * SPDX-FileCopyrightText: 2021-2023 Bart De Vries * * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ @@ -8,6 +8,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.14 as Controls import QtQuick.Layouts 1.14 import QtGraphicalEffects 1.15 +import QtQuick.Window 2.2 import org.kde.kirigami 2.15 as Kirigami @@ -51,8 +52,8 @@ Item { anchors.fill: parent source: root.imageSource fillMode: root.imageFillMode - sourceSize.width: root.imageResize ? width : undefined - sourceSize.height: root.imageResize ? height : undefined + sourceSize.width: root.imageResize ? width * Screen.devicePixelRatio : undefined + sourceSize.height: root.imageResize ? height * Screen.devicePixelRatio : undefined asynchronous: true mipmap: root.mipmap }