From a9bbe5dc5a805d70285255a35f3d6e8bc4e2e160 Mon Sep 17 00:00:00 2001 From: Ale Martinez Date: Sun, 25 Aug 2019 14:21:18 -0300 Subject: [PATCH] Use double division to compute dpi factors Fixes #2628 --- src/Core/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/main.cpp b/src/Core/main.cpp index f964b4cc5..82bfca266 100644 --- a/src/Core/main.cpp +++ b/src/Core/main.cpp @@ -370,8 +370,8 @@ main(int argc, char *argv[]) // being 1920 x 1080 rather than the native resolution if (desktop->screen()->devicePixelRatio() <= 1 && screenSize.width() > 2160) { // we're on a hidpi screen - lets create a multiplier - always use smallest - dpiXFactor = screenSize.width() / 1280; - dpiYFactor = screenSize.height() / 1024; + dpiXFactor = screenSize.width() / 1280.0; + dpiYFactor = screenSize.height() / 1024.0; if (dpiYFactor < dpiXFactor) dpiXFactor = dpiYFactor; else if (dpiXFactor < dpiYFactor) dpiYFactor = dpiXFactor;