Disable high DPI scaling on anything but Windows
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>
Sun, 25 Sep 2016 14:18:35 +0000 (16:18 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 4 Apr 2018 21:14:03 +0000 (23:14 +0200)
The automatic scaling only works well on Windows.

See e. g. e33532e048fa12ee32429ca83ee31aa8f065147d in qttools,
QTBUG-50698 and QTBUG-52318.

Resolves GH-254.

(cherry picked from commit 27f186f9c78928d8c929d534f9f845978ba5bc83)

src/common/main.cpp

index 3d33495..5908242 100644 (file)
@@ -180,7 +180,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
@@ -188,7 +188,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