From 60b08171aee1c33fe51cec4426709813d21c4770 Mon Sep 17 00:00:00 2001
From: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Date: Mon, 27 Jul 2015 12:48:03 +0200
Subject: [PATCH] Updated highDPI docs to 5.6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Change-Id: I09e6f39d0caedf0c06b0f7e3d46d1de61867f826
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
---
 doc/src/highdpi.qdoc | 48 +++++++++++++++++++++++++++++++++++++-------
 1 file changed, 41 insertions(+), 7 deletions(-)

diff --git a/doc/src/highdpi.qdoc b/doc/src/highdpi.qdoc
index cc9bd290..d8fb4e44 100644
--- a/doc/src/highdpi.qdoc
+++ b/doc/src/highdpi.qdoc
@@ -124,21 +124,55 @@
         \li Ability to provide pixmaps or artwork for high resolution:
             see \l{Drawing High Resolution Versions of Pixmaps and Images}.
 
-        \li Qt 5.4 introduces experimental support for scaling by by device pixel ratio
-            similar to OS X to the platform plugins for Windows and Unix (XCB).
-            This is controlled by the environment variable \c QT_DEVICE_PIXEL_RATIO.
-            It can be set to a numerical value to be used as scale factor or \c "auto"
-            which causes the scale factor to be determined by checking the monitor size.
+        \li Qt 5.6 supports cross-platform high-DPI scaling for legacy applications,
+            similar to the scaling done natively by OS X. This allows applications written
+            for low-DPI screens to run unchanged on high-DPI devices. This feature is
+            opt-in, and can be enabled by the following environment variables:
+            \list
+
+                \li \c QT_AUTO_SCREEN_SCALE_FACTOR [boolean] enables automatic scaling,
+                based on the pixel density of the monitor. This will not change the size
+                of point sized fonts, since point is a physical unit of measure. Multiple
+                screens may get different scale factors.
+
+                \li \c QT_SCALE_FACTOR [numeric] defines a global scale
+                factor for the whole application, including point sized fonts.
+
+                \li \c QT_SCREEN_SCALE_FACTORS [list] specifies scale factors
+                for each screen. This will not change the size
+                of point sized fonts. This environment variable is
+                mainly useful for debugging, or to work around monitors with wrong
+                \l {https://en.wikipedia.org/wiki/Extended_Display_Identification_Data}
+                {EDID information}(Extended Display Identification Data).
+
+                The format can be either a semicolon-separated list of scale
+                factors in the same order as QGuiApplication::screens(), or a
+                semicolon-separated list of \c name=value pairs, where \c
+                name is the same as QScreen::name().
+
+                \endlist
 
             It is recommended to use the \c Fusion style.
-    \endlist
+
+            \note Non-integer scale factors may cause significant
+            scaling/painting artifacts.
+
+         \li The application attribute \c Qt::AA_NoHighDpiScaling, introduced in Qt 5.6,
+             turns off all scaling. This is intended for applications that need to use
+             actual window system coordinates, regardless of environment variables.
+
+        \li An experimental implementation of high-DPI scaling was introduced in Qt 5.4.
+            It was enabled by the environment variable \c QT_DEVICE_PIXEL_RATIO, which
+            could be set to a numerical scale factor or \c "auto". This variable is
+            deprecated in Qt 5.6.
+        \endlist
 
     \section2 Migration of Existing Applications
 
     In order to get an application designed for low DPI values running on a high
     resolution monitors quickly, consider one of the scaling options (let the
     application run as \e{DPI Unaware} on Windows or set the environment
-    variable \c QT_DEVICE_PIXEL_RATIO to \c "auto". These options may incur
+    variable \c QT_AUTO_SCREEN_SCALE_FACTOR to \c "1". These options may incur
     some scaling or painting artifacts, though.
 
     In the longer term, the application should be adapted to run unmodified:
-- 
GitLab