mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
hotfix : enable auto scaling for high dpi devices on windows only
This commit is contained in:
parent
3fe5d1f7a4
commit
ed8b834e37
@ -266,12 +266,14 @@ void systemInit()
|
|||||||
// TODO revisit this...
|
// TODO revisit this...
|
||||||
QApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings, true);
|
QApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings, true);
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
|
||||||
// see https://doc-snapshots.qt.io/qt5-5.6/highdpi.html
|
// see https://doc-snapshots.qt.io/qt5-5.6/highdpi.html
|
||||||
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
|
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
|
||||||
#else
|
#else
|
||||||
// see http://doc.qt.io/qt-5/highdpi.html
|
// see http://doc.qt.io/qt-5/highdpi.html
|
||||||
qputenv("QT_DEVICE_PIXEL_RATIO", "auto");
|
qputenv("QT_DEVICE_PIXEL_RATIO", "auto");
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Force "basic" render loop
|
// Force "basic" render loop
|
||||||
|
Loading…
Reference in New Issue
Block a user