From 21d581d7550929ef509ffbe6fc55057c78ef735b Mon Sep 17 00:00:00 2001 From: romibi Date: Thu, 14 Jul 2016 11:36:07 +0200 Subject: [PATCH] Enable Qt's high-DPI scaling introduced in Qt5.6 Resolves GH-233. (cherry picked from commit d6129e6eb33cabdda455b1c2a71f9fb9bf4efb9d) --- src/common/main.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/common/main.cpp b/src/common/main.cpp index a9dafccd..1f397311 100644 --- a/src/common/main.cpp +++ b/src/common/main.cpp @@ -177,13 +177,19 @@ int main(int argc, char **argv) } #endif -# if defined BUILD_CORE +#if defined BUILD_CORE CoreApplication app(argc, argv); -# elif defined BUILD_QTUI +#elif defined BUILD_QTUI +# if QT_VERSION >= 0x050600 + QtUiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +# endif QtUiApplication app(argc, argv); -# elif defined BUILD_MONO +#elif defined BUILD_MONO +# if QT_VERSION >= 0x050600 + MonolithicApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +# endif MonolithicApplication app(argc, argv); -# endif +#endif #ifndef HAVE_KDE4 // the non-KDE version parses after app has been instantiated -- 2.20.1