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:
commit
3830a1940c
5
qtox.pro
5
qtox.pro
|
@ -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 {
|
||||
|
|
10
src/main.cpp
10
src/main.cpp
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user