From 6fb36572dcae748b81435602d0dc0a7968e28039 Mon Sep 17 00:00:00 2001 From: Luis Caro Date: Fri, 15 Sep 2017 15:28:38 +0100 Subject: cmake-gui: Enable High DPI scaling This Qt flag enables UI scaling based on scale factor provided by the operating system. Only supported on versions of Qt >= 5.6. The flag has no effect on macOS, where high DPI support is already enabled as a setting in the bundle's info.plist. Fixes: #17026 --- Source/QtDialog/CMakeSetup.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 9f881e2..ca0b015 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -92,6 +92,10 @@ int main(int argc, char** argv) cmAddPluginPath(); #endif +#if QT_VERSION >= 0x050600 + QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +#endif + QApplication app(argc, argv); setlocale(LC_NUMERIC, "C"); -- cgit v0.12