Skip to content

Commit

Permalink
Use double division to compute dpi factors
Browse files Browse the repository at this point in the history
Fixes #2628
  • Loading branch information
amtriathlon committed Aug 25, 2019
1 parent 3e99394 commit a9bbe5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Core/main.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit a9bbe5d

Please sign in to comment.