Skip to content

Commit

Permalink
(Windows only) Improve the dpi handling with different dpi screens on…
Browse files Browse the repository at this point in the history
… windows
  • Loading branch information
apeltauer authored and wwmayer committed Dec 2, 2020
1 parent 998e177 commit 181914b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Gui/Application.cpp
Expand Up @@ -1904,6 +1904,10 @@ void Application::runApplication(void)
#if QT_VERSION >= 0x050600
//Enable automatic scaling based on pixel density of display (added in Qt 5.6)
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#ifdef FC_OS_WIN32
SetProcessDPIAware(); // call before the main event loop
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
#endif
#endif
#if QT_VERSION >= 0x050100
//Enable support for highres images (added in Qt 5.1, but off by default)
Expand Down

0 comments on commit 181914b

Please sign in to comment.