From aa246f0ca851b38955f6f04caea9be298fd6cbd4 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Fri, 4 Dec 2015 16:07:33 +0800 Subject: [PATCH] Let OS handle DPI scaling for now. Should let Qt do the work when it's more mature. Opt-in to the high DPI pixmap support Closes #2963. --- dist/windows/qt.conf | 3 +++ src/app/application.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dist/windows/qt.conf b/dist/windows/qt.conf index bbe76d586..372600dc5 100644 --- a/dist/windows/qt.conf +++ b/dist/windows/qt.conf @@ -1,2 +1,5 @@ [Paths] Translations = translations + +[Platforms] +WindowsArguments = dpiawareness=1 diff --git a/src/app/application.cpp b/src/app/application.cpp index 2025f82b7..1a20c1f45 100644 --- a/src/app/application.cpp +++ b/src/app/application.cpp @@ -92,6 +92,9 @@ Application::Application(const QString &id, int &argc, char **argv) setApplicationName("qBittorrent"); initializeTranslation(); #ifndef DISABLE_GUI +#ifdef QBT_USES_QT5 + setAttribute(Qt::AA_UseHighDpiPixmaps, true); // opt-in to the high DPI pixmap support +#endif // QBT_USES_QT5 setQuitOnLastWindowClosed(false); #ifdef Q_OS_WIN connect(this, SIGNAL(commitDataRequest(QSessionManager &)), this, SLOT(shutdownCleanup(QSessionManager &)), Qt::DirectConnection);