high DPI respect system env

This commit is contained in:
Martin Rotter 2024-05-03 10:36:57 +02:00
parent 48731fb0e1
commit 7e50de2868

View file

@ -32,7 +32,11 @@ int main(int argc, char* argv[]) {
// High DPI stuff. // High DPI stuff.
#if QT_VERSION >= 0x050E00 // Qt >= 5.14.0 #if QT_VERSION >= 0x050E00 // Qt >= 5.14.0
auto high_dpi_existing_env = qgetenv("QT_ENABLE_HIGHDPI_SCALING");
if (high_dpi_existing_env.isEmpty()) {
qputenv("QT_ENABLE_HIGHDPI_SCALING", "1"); qputenv("QT_ENABLE_HIGHDPI_SCALING", "1");
}
#else #else
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1"); qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
#endif #endif