From aa7d6d2339322a9ba80f4b6c1af80a6944aeb657 Mon Sep 17 00:00:00 2001 From: Matthijs Tijink Date: Sun, 21 Jul 2019 10:53:40 +0200 Subject: [PATCH] Fix devicePixelRatio in presenter plugin --- plugins/presenter/Presenter.qml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/presenter/Presenter.qml b/plugins/presenter/Presenter.qml index 104a1dce4..b2955d7f0 100644 --- a/plugins/presenter/Presenter.qml +++ b/plugins/presenter/Presenter.qml @@ -29,6 +29,8 @@ Item { property real xPos: 0.5 property real yPos: 0.5 + property real devicePixelRatio: Window.window != null && Window.window.screen != null ? Window.window.screen.devicePixelRatio : 1.0 + ParticleSystem { id: particles width: parent.width/20 @@ -57,7 +59,7 @@ Item { group: "center" emitRate: 900 lifeSpan: 200 - size: 20 * Window.screen.devicePixelRatio + size: 20 * devicePixelRatio sizeVariation: 2 endSize: 0 //! [0] @@ -77,9 +79,9 @@ Item { startTime: 200 emitRate: 2000 lifeSpan: 20 - size: 28 * Window.screen.devicePixelRatio - sizeVariation: 2 * Window.screen.devicePixelRatio - endSize: 16 * Window.screen.devicePixelRatio + size: 28 * devicePixelRatio + sizeVariation: 2 * devicePixelRatio + endSize: 16 * devicePixelRatio shape: EllipseShape {fill: false} velocity: TargetDirection { targetX: particles.width/2