mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Round system scale in step of 5 points, just like in settings
This commit is contained in:
parent
6e89d41d58
commit
0b100884fc
1 changed files with 1 additions and 1 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue