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>
Thu, 13 Oct 2016 20:15:04 +0000 (22:15 +0200)
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

index 529fb53..5fe45ad 100644 (file)
@@ -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