Skip to content
Permalink
Browse files

Merge pull request #11322 from Chocobo1/dpi

Use screen real physical DPI on Windows
  • Loading branch information...
Chocobo1 committed Oct 4, 2019
2 parents 339e195 + 0760398 commit c7f092b95fea7532bb019933e4052c9090f379fb
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/gui/utils.cpp
@@ -66,8 +66,9 @@ qreal Utils::Gui::screenScalingFactor(const QWidget *widget)
return 1;

#ifdef Q_OS_WIN
const int screen = qApp->desktop()->screenNumber(widget);
return (QApplication::screens()[screen]->logicalDotsPerInch() / 96);
const int screenNumber = qApp->desktop()->screenNumber(widget);
const QScreen *screen = QApplication::screens()[screenNumber];
return (screen->logicalDotsPerInch() / screen->physicalDotsPerInch());
#elif defined(Q_OS_MACOS)
return 1;
#else

0 comments on commit c7f092b

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