1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #3253

initramfs (1):
      refactor(hidpi): enable HiDPI support if Qt supports it
This commit is contained in:
sudden6 2016-05-15 13:14:44 +02:00
commit 3830a1940c
No known key found for this signature in database
GPG Key ID: 279509B499E032B9
2 changed files with 6 additions and 9 deletions

View File

@ -108,11 +108,6 @@ contains(DISABLE_FILTER_AUDIO, NO) {
DEFINES += QTOX_FILTER_AUDIO
}
contains(HIGH_DPI, YES) {
QT_DEVICE_PIXEL_RATIO= auto
DEFINES += HIGH_DPI
}
contains(JENKINS,YES) {
INCLUDEPATH += ./libs/include/
} else {

View File

@ -117,6 +117,12 @@ void logMessageHandler(QtMsgType type, const QMessageLogContext& ctxt, const QSt
int main(int argc, char *argv[])
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
qInstallMessageHandler(logMessageHandler);
QApplication a(argc, argv);
@ -129,10 +135,6 @@ int main(int argc, char *argv[])
osx::migrateProfiles();
#endif
#ifdef HIGH_DPI
a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
#endif
qsrand(time(0));
Settings::getInstance();
Translator::translate();