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

Set preview to correct device size

Summary:
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: https://phabricator.kde.org/D24591
parent 8a9d7e9d
......@@ -16,6 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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 {
top: root.top
left: root.left
......
Markdown is supported
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