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>
bb10
Paul Olav Tvete 2016-11-01 13:10:35 +01:00
parent fe51dbac3d
commit ffe72840a3
1 changed files with 4 additions and 2 deletions

View File

@ -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