summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2021-02-24 00:06:26 +0100
committerQt CI Bot <qt_ci_bot@qt-project.org>2021-03-02 16:00:51 +0000
commit2a5262c0dd9135d0f0bad7a42141696fbb5a7ba2 (patch)
tree907af47d8f95ee24250089edb66ec5fb7b63603a /src
parentf28088873e955f599e585c7dc732ffc93bebe782 (diff)
parentee409e6f0cab4aa051f75f7c7116d4b607d137fc (diff)
Merge "High-DPI: Set the minimum scale factor to 1"
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qhighdpiscaling.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp
index a2ca58e4c2..5bc3f11b3d 100644
--- a/src/gui/kernel/qhighdpiscaling.cpp
+++ b/src/gui/kernel/qhighdpiscaling.cpp
@@ -436,11 +436,9 @@ qreal QHighDpiScaling::roundScaleFactor(qreal rawFactor)
break;
}
- // Don't round down to to zero; clamp the minimum (rounded) factor to 1.
- // This is not a common case but can happen if a display reports a very
- // low DPI.
- if (scaleFactorRoundingPolicy != Qt::HighDpiScaleFactorRoundingPolicy::PassThrough)
- roundedFactor = qMax(roundedFactor, qreal(1));
+ // Clamp the minimum factor to 1. Qt does not currently render
+ // correctly with factors less than 1.
+ roundedFactor = qMax(roundedFactor, qreal(1));
return roundedFactor;
}