Round system scale in step of 5 points, just like in settings

This commit is contained in:
Ilya Fedin 2023-02-11 07:36:21 +04:00 committed by John Preston
parent 6e89d41d58
commit 0b100884fc
1 changed files with 1 additions and 1 deletions

View File

@ -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()) {