diff options
author | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2015-10-16 12:24:38 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-11-04 12:08:59 +0000 |
commit | add58edcdbd986e68cdd65a2a935b76d85d5b639 (patch) | |
tree | 2b58578368ed05d6c930910add4633bbb1960554 /src/corelib/global/qnamespace.h | |
parent | 1bf639d5605863970b8dc5a91d5fc785cdf0ecf1 (diff) |
Update high-DPI scaling enablers.
Make it possible to enable and disable both at the
environment variable level and at the source code
level. This applies to scaling done by Qt using display
density information provided by the operating system.
Disabling is done with a 'veto' system: both the environment
and source code my prevent the other for enabling
scaling. This covers use cases of 'my system does not
provide correct display metrics' and 'my application
needs access to display pixels', respectively.
On the environment, scaling is now enabled with
QT_AUTO_SCREEN_SCALE_FACTOR=1 and disabled with
QT_AUTO_SCREEN_SCALE_FACTOR=0. In source code the
corresponding application attributes are AA_EnableHighDpiScaling
and AA_DisapleHighDpiScaling. Not setting any of these
indicates 'no preference'.
The global scale factor set by QT_SCALE_FACTOR is
not affected by any if the disablers.
Task-number: QTBUG-46615
Change-Id: If18607d4b56ace1914a710e5aa60b2f0968e0010
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Diffstat (limited to 'src/corelib/global/qnamespace.h')
-rw-r--r-- | src/corelib/global/qnamespace.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index de8a17fa51..c4f5415a01 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -496,7 +496,8 @@ public: AA_UseSoftwareOpenGL = 17, AA_ShareOpenGLContexts = 18, AA_SetPalette = 19, - AA_NoHighDpiScaling = 20, + AA_EnableHighDpiScaling = 20, + AA_DisableHighDpiScaling = 21, // Add new attributes before this line AA_AttributeCount |