From: tobtoht Date: Thu, 12 Jan 2023 22:40:12 +0000 (+0100) Subject: Linux: fix Qt scaling factor X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=6754dd3370250ce0c29959acc4de4db785c092c3;p=gamesguru%2Ffeather.git Linux: fix Qt scaling factor --- diff --git a/src/main.cpp b/src/main.cpp index 8227ad5f..a84e0e04 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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");