summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qhighdpiscaling.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2016-11-01 13:10:35 +0100
committerPaul Olav Tvete <paul.tvete@qt.io>2016-11-08 11:32:02 +0000
commitffe72840a34ed7c99294f29f85828c5d5fad728f (patch)
treeaa74854c83583fd17ad5448d99661d7f533357d0 /src/gui/kernel/qhighdpiscaling.cpp
parentfe51dbac3d20ef9275dd1a9070f8185dc7705ad9 (diff)
Only turn off font hinting when scale is != 1
KDE will set the screen scale factors to 1 by default. Make sure we don't turn off font hinting in that case. Task-number: QTBUG-56797 Change-Id: Ieab18a7cfe4c1cb7087caab4d881932a4a991bc8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/gui/kernel/qhighdpiscaling.cpp')
-rw-r--r--src/gui/kernel/qhighdpiscaling.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp
index 6846196719..a94ad1e00a 100644
--- a/src/gui/kernel/qhighdpiscaling.cpp
+++ b/src/gui/kernel/qhighdpiscaling.cpp
@@ -332,8 +332,10 @@ static const char scaleFactorProperty[] = "_q_scaleFactor";
*/
void QHighDpiScaling::setScreenFactor(QScreen *screen, qreal factor)
{
- m_screenFactorSet = true;
- m_active = true;
+ if (!qFuzzyCompare(factor, qreal(1))) {
+ m_screenFactorSet = true;
+ m_active = true;
+ }
screen->setProperty(scaleFactorProperty, QVariant(factor));
// hack to force re-evaluation of screen geometry