mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-24 10:16:00 +03:00
Merge pull request #11322 from Chocobo1/dpi
Use screen real physical DPI on Windows
This commit is contained in:
commit
c7f092b95f
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue