From 900f2cb6f7070b4d426f3b83787ac489b8a2e827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 25 Apr 2016 11:31:34 +0200 Subject: Update Dpi and scale factor computation Remove pixelScale() in favor of logicalBaseDpi(). Compute scale factor based on logical DPI and logical base DPI, or optionally based on the physical DPI. Add policies for running the scale factor and adjusting the logical DPI reported to the application. The policies are set via environment variables: QT_SCALE_FACTOR_ROUNDING_POLICY=Round|Ceil|Floor|RoundPreferFloor|PassThrough QT_DPI_ADJUSTMENT_POLICY=AdjustDpi|DontAdjustDpi|AdjustUpOnly QT_USE_PHYSICAL_DPI=0|1 Done-with: Friedemann Kleint Task-number: QTBUG-53022 Change-Id: I4846f223186df665eb0a9c827eaef0a96d1f458f Reviewed-by: Friedemann Kleint --- src/plugins/platforms/cocoa/qcocoascreen.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins/platforms/cocoa/qcocoascreen.h') diff --git a/src/plugins/platforms/cocoa/qcocoascreen.h b/src/plugins/platforms/cocoa/qcocoascreen.h index 491af2fe9c..60243b79be 100644 --- a/src/plugins/platforms/cocoa/qcocoascreen.h +++ b/src/plugins/platforms/cocoa/qcocoascreen.h @@ -68,6 +68,7 @@ public: qreal devicePixelRatio() const override { return m_devicePixelRatio; } QSizeF physicalSize() const override { return m_physicalSize; } QDpi logicalDpi() const override { return m_logicalDpi; } + QDpi logicalBaseDpi() const override { return m_logicalDpi; } qreal refreshRate() const override { return m_refreshRate; } QString name() const override { return m_name; } QPlatformCursor *cursor() const override { return m_cursor; } -- cgit v1.2.3