From 13a9920c112c562575675793fa2fb9723d431e40 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 11 Feb 2023 07:37:11 +0400 Subject: [PATCH] Set QT_DPI_ADJUSTMENT_POLICY for older Qt to the new default value --- Telegram/SourceFiles/core/launcher.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp index 80ea2fdb4..652e759e3 100644 --- a/Telegram/SourceFiles/core/launcher.cpp +++ b/Telegram/SourceFiles/core/launcher.cpp @@ -320,6 +320,10 @@ void Launcher::init() { } void Launcher::initHighDpi() { +#if QT_VERSION < QT_VERSION_CHECK(6, 2, 0) + qputenv("QT_DPI_ADJUSTMENT_POLICY", "AdjustDpi"); +#endif // Qt < 6.2.0 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); if (OptionFractionalScalingEnabled.value()) { QApplication::setHighDpiScaleFactorRoundingPolicy(