]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
Linux: fix Qt scaling factor
authortobtoht <tob@featherwallet.org>
Thu, 12 Jan 2023 22:40:12 +0000 (23:40 +0100)
committertobtoht <tob@featherwallet.org>
Thu, 12 Jan 2023 23:07:02 +0000 (00:07 +0100)
src/main.cpp

index 8227ad5fccb541f582f6028f38f51c4dfc62c43d..a84e0e0491b60af9c187642b3b729cbabbf324bf 100644 (file)
@@ -37,11 +37,6 @@ if (AttachConsole(ATTACH_PARENT_PROCESS)) {
 }
 #endif
 
-// Disable High DPI scaling on Linux for now
-#if defined(Q_OS_LINUX)
-    qputenv("QT_ENABLE_HIGHDPI_SCALING", "0");
-#endif
-
     QStringList argv_;
     for(int i = 0; i != argc; i++){
         argv_ << QString::fromStdString(argv[i]);
@@ -96,11 +91,17 @@ if (AttachConsole(ATTACH_PARENT_PROCESS)) {
     QApplication::setDesktopSettingsAware(true); // use system font
     QApplication::setApplicationVersion(FEATHER_VERSION);
 
+#if defined(Q_OS_LINUX)
+    // PassThrough results in muddy text
+    QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Round);
+#endif
+
     SingleApplication app(argc, argv);
 
     QApplication::setQuitOnLastWindowClosed(false);
     QApplication::setApplicationName("FeatherWallet");
 
+
     // Setup config directories
     QString configDir = Config::defaultConfigDir().path();
     QString config_dir_tor = QString("%1/%2").arg(configDir, "tor");