From aa5ac86b874c049ffb8d35c34575da08604824cc Mon Sep 17 00:00:00 2001 From: "ADDIREKT\\Apeltauer" Date: Mon, 23 Nov 2020 07:41:47 +0100 Subject: [PATCH] (Windows only) Improve the dpi handling with different dpi screens on windows --- src/Gui/Application.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 7258045a4d..15213b3eb4 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -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)