From: romibi Date: Thu, 14 Jul 2016 09:36:07 +0000 (+0200) Subject: Enable Qt's high-DPI scaling introduced in Qt5.6 X-Git-Tag: travis-deploy-test~403 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=d6129e6eb33cabdda455b1c2a71f9fb9bf4efb9d Enable Qt's high-DPI scaling introduced in Qt5.6 Resolves GH-233. --- diff --git a/src/common/main.cpp b/src/common/main.cpp index 69a95db9..01d9d82f 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