Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2016-06-02 18:57:10 +0300
committerDaniel Molkentin <danimo@owncloud.com>2016-06-20 18:02:06 +0300
commitc81ed0a4640d75fac179c8b7842e8fdaab41b531 (patch)
tree4f3858f768ea9c42e2c159834d0e05c6f55f78d6
parentafdf88687850f366865b04b3a1594728a0f3bef7 (diff)
GUI: don't force the environment variable for high DPI on linux.v2.2.2
Setting the Environment variable only for owncloud makes in inconsistant with other Qt application running at the same time. The users can still set it themself for the whole desktop if they wish. Addresses #4840
-rw-r--r--src/gui/main.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index 2b395d580..d57534490 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -47,16 +47,19 @@ int main(int argc, char **argv)
{
Q_INIT_RESOURCE(client);
-#ifndef Q_OS_MAC
+#ifdef Q_OS_WIN
// If the font size ratio is set on Windows, we need to
// enable the auto pixelRatio in Qt since we don't
// want to use sizes relative to the font size everywhere.
// This is automatic on OS X, but opt-in on Windows and Linux
// https://doc-snapshots.qt.io/qt5-5.6/highdpi.html#qt-support
+ // We do not define it on linux so the behaviour is kept the same
+ // as other Qt apps in the desktop environment. (which may or may
+ // not set this envoronment variable)
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
#endif
-#endif // !Q_OS_MAC
+#endif // !Q_OS_WIN
#ifdef Q_OS_MAC
Mac::CocoaInitializer cocoaInit; // RIIA