From 0b100884fc5bf585ef0c9309568c3e9ae70a6830 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 11 Feb 2023 07:36:21 +0400 Subject: [PATCH] Round system scale in step of 5 points, just like in settings --- Telegram/SourceFiles/core/sandbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp index 4ae2b7b66..7be76f0b7 100644 --- a/Telegram/SourceFiles/core/sandbox.cpp +++ b/Telegram/SourceFiles/core/sandbox.cpp @@ -239,7 +239,7 @@ void Sandbox::setupScreenScale() { const auto basePair = screen->handle()->logicalBaseDpi(); const auto base = (basePair.first + basePair.second) * 0.5; const auto screenScaleExact = dpi / base; - const auto screenScale = int(base::SafeRound(screenScaleExact * 4)) * 25; + const auto screenScale = int(base::SafeRound(screenScaleExact * 20)) * 5; LOG(("Primary screen DPI: %1, Base: %2.").arg(dpi).arg(base)); LOG(("Computed screen scale: %1").arg(screenScale)); if (Platform::IsMac()) {