Only set Qt::AA_EnableHighDpiScaling for Windows builds.

Issue #1073
This commit is contained in:
Craig Drummond
2017-08-25 22:19:56 +01:00
committed by Craig Drummond
parent 16085e7eb7
commit fb879b168d
2 changed files with 3 additions and 11 deletions

View File

@@ -25,8 +25,7 @@
rules dialogs.
18. Fix some potential security issues - thanks to Jonas Wielicki for the
patches.
19. Only set Qt::AA_EnableHighDpiScaling under Linux if
QT_AUTO_SCREEN_SCALE_FACTOR is set and non-zero.
19. Only set Qt::AA_EnableHighDpiScaling for Windows builds.
2.1.0
-----

View File

@@ -240,15 +240,8 @@ int main(int argc, char *argv[])
QCoreApplication::setOrganizationName(ORGANIZATION_NAME);
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#if QT_VERSION >= 0x050600
#ifdef Q_OS_LINUX
// Qt::AA_EnableHighDpiScaling broken for linux? #1063 / #1073
QByteArray autoScale = qgetenv("QT_AUTO_SCREEN_SCALE_FACTOR");
if (!autoScale.isEmpty() && "0"!=autoScale)
#endif
{
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
}
#if QT_VERSION >= 0x050600 && defined Q_OS_WIN
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
Application app(argc, argv);