Skip to content
Permalink
Browse files

Use double division to compute dpi factors

Fixes #2628
  • Loading branch information...
amtriathlon committed Aug 25, 2019
1 parent 3e99394 commit a9bbe5dc5a805d70285255a35f3d6e8bc4e2e160
Showing with 2 additions and 2 deletions.
  1. +2 −2 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;

0 comments on commit a9bbe5d

Please sign in to comment.
You can’t perform that action at this time.