diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2017-10-07 01:35:29 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2019-08-23 03:41:23 +0200 |
commit | f1e40dd6d6968c59885231f61f94787abd4cf783 (patch) | |
tree | c5f4b93f25a2a542f9f889a3c8b9eb395f984728 /src/corelib/global/qnamespace.qdoc | |
parent | 1de8b01d2b6db8a4fe2eddd0c595d9e680964db5 (diff) |
Add high-DPI scale factor rounding policy C++ API
This API enables tuning of how Qt rounds fractional scale factors, and
corresponds to the QT_SCALE_FACTOR_ROUNDING_POLICY environment
variable
New API:
Qt::HighDPiScaleFactorRoundingPolicy
QGuiApplication::setHighDpiScaleFactorRoundingPolicy()
QGuiApplication::highDpiScaleFactorRoundingPolicy()
Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io>
Task-number: QTBUG-53022
Change-Id: Ic360f26a173caa757e4ebde35ce08a6b74290b7d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/corelib/global/qnamespace.qdoc')
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 0ff6be2049..886aedb4f3 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -3275,3 +3275,25 @@ \value ChecksumItuV41 Checksum calculation based on ITU-V.41. */ + +/*! + \enum Qt::HighDpiScaleFactorRoundingPolicy + \since 5.14 + + This enum describes the possible High-DPI scale factor rounding policies, which + decide how non-integer scale factors (such as Windows 150%) are handled. + + The active policy is set by calling QGuiApplication::setHighDdpiScaleFactorRoundingPolicy() before + the application object is created, or by setting the QT_SCALE_FACTOR_ROUNDING_POLICY + environment variable. + + \sa QGuiApplication::setHighDdpiScaleFactorRoundingPolicy() + \sa AA_EnableHighDpiScaling. + + \omitvalue Unset + \value Round Round up for .5 and above. + \value Ceil Always round up. + \value Floor Always round down. + \value RoundPreferFloor Round up for .75 and above. + \value PassThrough Don't round. +*/ |