Prechádzať zdrojové kódy

Windows: disable HIDPI scaling for now

Causes extremely weird behavior, such as reporting wrong windows
coordinates.

It can still be enabled with "--scale-factor=" (empty argument),
although I didn't confirm whether this really works.
Vincent Lang 8 rokov pred
rodič
commit
49fcf82d44
1 zmenil súbory, kde vykonal 5 pridanie a 1 odobranie
  1. 5 1
      src/main.cpp

+ 5 - 1
src/main.cpp

@@ -156,9 +156,13 @@ int main(int argc, char *argv[])
     }
 
     auto scale = parser.value("scale-factor");
+#ifdef Q_OS_WIN32
+    if (scale == "auto")
+      scale = "none";
+#endif
     if (scale.isEmpty() || scale == "auto")
       QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
-    else
+    else if (scale != "none")
       qputenv("QT_SCALE_FACTOR", scale.toUtf8());
 
     QApplication app(newArgc, newArgv);