From 7e50de28682154d7bb7422e3c6f5bee72df13fae Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Fri, 3 May 2024 10:36:57 +0200 Subject: [PATCH] high DPI respect system env --- src/rssguard/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rssguard/main.cpp b/src/rssguard/main.cpp index 1cb4ba467..2331516ef 100644 --- a/src/rssguard/main.cpp +++ b/src/rssguard/main.cpp @@ -32,7 +32,11 @@ int main(int argc, char* argv[]) { // High DPI stuff. #if QT_VERSION >= 0x050E00 // Qt >= 5.14.0 - qputenv("QT_ENABLE_HIGHDPI_SCALING", "1"); + auto high_dpi_existing_env = qgetenv("QT_ENABLE_HIGHDPI_SCALING"); + + if (high_dpi_existing_env.isEmpty()) { + qputenv("QT_ENABLE_HIGHDPI_SCALING", "1"); + } #else qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1"); #endif