aboutsummaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2023-10-05 10:05:37 +0200
committerAlessandro Portale <alessandro.portale@qt.io>2023-10-05 09:03:13 +0000
commit718de1bf787bf8047b8c012d238de2918316b038 (patch)
tree1beb4cfcbc0d2949f330d4e1fb47b53a941d211b /src/app
parentdbfaa6a842dcbfc04d524d5f14247e74997867e5 (diff)
App/Core: Only set DPI rounding options if default not "Unset"
Instead of making the OS specific decision whether to set DPI rounding options or not in several places, leave the OS specific check to StyleHelper::defaultHighDpiScaleFactorRoundingPolicy() and test for "Unset". Change-Id: I37ab4a0c643d1b1597e5f45496510f2f36f1a386 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp
index 5acc468d9c..036d169c06 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -281,7 +281,9 @@ static Utils::QtcSettings *createUserSettings()
static void setHighDpiEnvironmentVariable()
{
- if (Utils::HostOsInfo::isMacHost() || qEnvironmentVariableIsSet("QT_SCALE_FACTOR_ROUNDING_POLICY"))
+ if (Utils::StyleHelper::defaultHighDpiScaleFactorRoundingPolicy()
+ == Qt::HighDpiScaleFactorRoundingPolicy::Unset
+ || qEnvironmentVariableIsSet("QT_SCALE_FACTOR_ROUNDING_POLICY"))
return;
std::unique_ptr<Utils::QtcSettings> settings(createUserSettings());