From 27f186f9c78928d8c929d534f9f845978ba5bc83 Mon Sep 17 00:00:00 2001 From: "Martin T. H. Sandsmark" Date: Sun, 25 Sep 2016 16:18:35 +0200 Subject: [PATCH] Disable high DPI scaling on anything but Windows The automatic scaling only works well on Windows. See e. g. e33532e048fa12ee32429ca83ee31aa8f065147d in qttools, QTBUG-50698 and QTBUG-52318. Resolves GH-254. --- src/common/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/main.cpp b/src/common/main.cpp index 529fb536..5fe45ad6 100644 --- a/src/common/main.cpp +++ b/src/common/main.cpp @@ -186,7 +186,7 @@ int main(int argc, char **argv) #if defined BUILD_CORE CoreApplication app(argc, argv); #elif defined BUILD_QTUI -# if QT_VERSION >= 0x050600 +# if QT_VERSION >= 0x050600 && defined(Q_OS_WIN) QtUiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif # if QT_VERSION >= 0x050700 @@ -194,7 +194,7 @@ int main(int argc, char **argv) # endif QtUiApplication app(argc, argv); #elif defined BUILD_MONO -# if QT_VERSION >= 0x050600 +# if QT_VERSION >= 0x050600 && defined(Q_OS_WIN) MonolithicApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif # if QT_VERSION >= 0x050700 -- 2.20.1