From 27a9b61f72a0bce2b2c8b5e9a6d49743796c7e4f Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 1 Nov 2021 09:54:20 +0400 Subject: [PATCH] Avoid Qt's fractional scaling --- Telegram/SourceFiles/core/launcher.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp index c18eacfb0..eda856e5b 100644 --- a/Telegram/SourceFiles/core/launcher.cpp +++ b/Telegram/SourceFiles/core/launcher.cpp @@ -287,6 +287,8 @@ void Launcher::init() { QApplication::setApplicationName(qsl("TelegramDesktop")); QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true); + QApplication::setHighDpiScaleFactorRoundingPolicy( + Qt::HighDpiScaleFactorRoundingPolicy::Floor); #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // fallback session management is useless for tdesktop since it doesn't have