From 81f4ce5ea8eb2f8f3c460eb4920a7d6847bb442d Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 3 Jul 2018 09:48:49 +0100 Subject: [PATCH] Opt out of Qt's DPI scaling by default --- src/GUI/QtLauncher.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/GUI/QtLauncher.cxx b/src/GUI/QtLauncher.cxx index f9c55d393..f2f8978dd 100644 --- a/src/GUI/QtLauncher.cxx +++ b/src/GUI/QtLauncher.cxx @@ -266,9 +266,15 @@ void initApp(int& argc, char** argv, bool doInitQSettings) // this gets into a knot on Optimus setups (since we export the magic // Optimus / AMD symbols in main.cxx). QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL); -#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); -#endif + + // becuase on Windows, Qt only supports integer scaling factors, + // forceibly enabling HighDpiScaling is controversial. + // leave things unset here, so users can use env var + // QT_AUTO_SCREEN_SCALE_FACTOR=1 to enable it at runtime + +//#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) + // QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +//#endif static_qApp.reset(new QApplication(s_argc, argv)); static_qApp->setOrganizationName("FlightGear"); static_qApp->setApplicationName("FlightGear");