From f19b6230ed4210a84b5c0210d484a3d441e82ee0 Mon Sep 17 00:00:00 2001 From: Sean Date: Mon, 2 Mar 2015 03:38:42 -0800 Subject: [PATCH] High DPI scaling High DPI scaling Update qtox.pro Oh right not everyone uses Qt5.4 Why did I use the web ui --- qtox.pro | 7 ++++++- src/main.cpp | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/qtox.pro b/qtox.pro index afe4fa11d..a40b7fc9f 100644 --- a/qtox.pro +++ b/qtox.pro @@ -5,7 +5,7 @@ #------------------------------------------------- -# Copyright (C) 2014 by Project Tox +# Copyright (C) 2015 by Project Tox # # This file is part of qTox, a Qt-based graphical interface for Tox. # @@ -100,6 +100,11 @@ contains(DISABLE_FILTER_AUDIO, YES) { DEFINES += QTOX_FILTER_AUDIO } +contains(HIGH_DPI, YES) { + QT_DEVICE_PIXEL_RATIO= auto + DEFINES += HIGH_DPI +} + contains(JENKINS,YES) { INCLUDEPATH += ./libs/include/ } else { diff --git a/src/main.cpp b/src/main.cpp index ec7a3c1d2..4e36e9b4c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -62,6 +62,10 @@ int main(int argc, char *argv[]) a.setApplicationName("qTox"); a.setOrganizationName("Tox"); a.setApplicationVersion("\nGit commit: " + QString(GIT_VERSION)); + +#ifdef HIGH_DPI + a.setAttribute(Qt::AA_UseHighDpiPixmaps, true); +#endif // Process arguments QCommandLineParser parser;