mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 07:05:13 +00:00
Round system scale in step of 5 points, just like in settings
This commit is contained in:
@@ -239,7 +239,7 @@ void Sandbox::setupScreenScale() {
|
|||||||
const auto basePair = screen->handle()->logicalBaseDpi();
|
const auto basePair = screen->handle()->logicalBaseDpi();
|
||||||
const auto base = (basePair.first + basePair.second) * 0.5;
|
const auto base = (basePair.first + basePair.second) * 0.5;
|
||||||
const auto screenScaleExact = dpi / base;
|
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(("Primary screen DPI: %1, Base: %2.").arg(dpi).arg(base));
|
||||||
LOG(("Computed screen scale: %1").arg(screenScale));
|
LOG(("Computed screen scale: %1").arg(screenScale));
|
||||||
if (Platform::IsMac()) {
|
if (Platform::IsMac()) {
|
||||||
|
Reference in New Issue
Block a user