Enable HiDpi scaling with Qt 5.6
authorDaniel Molkentin <danimo@owncloud.com>
Mon, 4 Jan 2016 10:49:03 +0000 (11:49 +0100)
committerDaniel Molkentin <danimo@owncloud.com>
Mon, 4 Jan 2016 10:50:00 +0000 (11:50 +0100)
src/gui/application.cpp

index 01248294089f4e7ef6ba7eb07856fec0ed274a45..f347020bb59e1a3d21a8e68713aea96762d5a0f3 100644 (file)
@@ -112,6 +112,11 @@ Application::Application(int &argc, char **argv) :
     setWindowIcon( _theme->applicationIcon() );
 #if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
     setAttribute(Qt::AA_UseHighDpiPixmaps, true);
+#endif
+#if QT_VERSION > QT_VERSION_CHECK(5, 6, 0)
+    // this may slightly break some styles until they
+    // get fixed, but will make dialogs readable.
+    setAttribute(Qt::AA_EnableHighDpiScaling, true);
 #endif
     parseOptions(arguments());
     //no need to waste time;