From 26a8f46634a56fe7397d7e15b717a727dc0df41f Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 16 Dec 2021 04:54:49 +0400 Subject: [PATCH] Fix global scale reset with custom platformthemes At least Kvantum makes QGuiApplication constructor to call QGuiApplication::devicePixelRatio, so the value is cached and won't change. Resetting the cache fixes the issue. --- ui/ui_utility.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/ui_utility.cpp b/ui/ui_utility.cpp index 5fef2af..e66055d 100644 --- a/ui/ui_utility.cpp +++ b/ui/ui_utility.cpp @@ -13,6 +13,8 @@ #include #include #include + +#include #include #include @@ -214,6 +216,7 @@ bool IsContentVisible( void DisableCustomScaling() { QHighDpiScaling::setGlobalFactor(1); + QGuiApplicationPrivate::resetCachedDevicePixelRatio(); } int WheelDirection(not_null e) {