Restore High DPI scale factors

Change the default rounding policy to "Round" so that 2 is used
for 150% (144DPI) on Windows, as it was in 5.13.

Fixes: QTBUG-80934
Change-Id: I0cba986ce6afc9e2737c656000ad854c07844360
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Friedemann Kleint 2020-01-02 11:33:53 +01:00
parent c72322804d
commit 2421759458

View File

@ -153,7 +153,7 @@ Qt::HighDpiScaleFactorRoundingPolicy QGuiApplicationPrivate::highDpiScaleFactorR
// that behavior by disabling rounding by default.
Qt::HighDpiScaleFactorRoundingPolicy::PassThrough;
#else
Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor;
Qt::HighDpiScaleFactorRoundingPolicy::Round;
#endif
bool QGuiApplicationPrivate::highDpiScalingUpdated = false;
@ -3554,8 +3554,8 @@ Qt::ApplicationState QGuiApplication::applicationState()
environment variable. The QGuiApplication::highDpiScaleFactorRoundingPolicy()
accessor will reflect the environment, if set.
The default value is Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor.
On Qt for Android the default is Qt::HighDpiScaleFactorRoundingPolicy::PassThough,
The default value is Qt::HighDpiScaleFactorRoundingPolicy::Round.
On Qt for Android the default is Qt::HighDpiScaleFactorRoundingPolicy::PassThrough,
which preserves historical behavior from earlier Qt versions.
*/
void QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy policy)