From dd9da0441b18d1946a7b3d28e4e8819b1921de6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 25 Apr 2016 09:27:48 +0200 Subject: Compute logical DPI on a per-screen basis The logical DPI reported to applications is the platform screen logical DPI divided by the platform screen scale factor. Use the screen in question when calculating the DPI instead of the values from the main screen. QHighDpiScaling::logicalDpi now takes a QScreen pointer. Done-with: Friedemann Kleint Task-number: QTBUG-53022 Change-Id: I0f62b5878c37e3488e9a8cc48aef183ff822d0c4 Reviewed-by: Friedemann Kleint --- src/gui/kernel/qhighdpiscaling_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/kernel/qhighdpiscaling_p.h') diff --git a/src/gui/kernel/qhighdpiscaling_p.h b/src/gui/kernel/qhighdpiscaling_p.h index 674b737808..e578625305 100644 --- a/src/gui/kernel/qhighdpiscaling_p.h +++ b/src/gui/kernel/qhighdpiscaling_p.h @@ -98,7 +98,7 @@ public: static QPoint mapPositionToNative(const QPoint &pos, const QPlatformScreen *platformScreen); static QPoint mapPositionToGlobal(const QPoint &pos, const QPoint &windowGlobalPosition, const QWindow *window); static QPoint mapPositionFromGlobal(const QPoint &pos, const QPoint &windowGlobalPosition, const QWindow *window); - static QDpi logicalDpi(); + static QDpi logicalDpi(const QScreen *screen); private: static qreal screenSubfactor(const QPlatformScreen *screen); -- cgit v1.2.3