summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2020-08-07 11:36:31 +0200
committerMorten Johan Sørvig <morten.sorvig@qt.io>2020-08-19 15:01:45 +0200
commit733b65384468374d781455763a4dd32887b32626 (patch)
tree6cfc584e7128d4102ced7817a6fe1a3cd7912f5f /src/gui/kernel/qguiapplication.cpp
parentade59ea316dc17ff6c25fb10939a03008a70c11b (diff)
Update QHighDpiScaling on DPI change
Make sure Qt reacts correctly to DPI changes while the application is running, also when going from “standard-dpi” to “high-dpi” (like Windows 100% to 200%). Call QHighDpiScaling::upateHighDpiScaling() on DPI change and update the m_usePixelDensity flag from there. Fixes: QTBUG-85384 Pick-to: 5.15 Change-Id: I8ca83e4eea76cc8ba701a18e1f8c535b9953918f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 6550725faa..89b16a39a7 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -3092,6 +3092,8 @@ void QGuiApplicationPrivate::processScreenLogicalDotsPerInchChange(QWindowSystem
if (QCoreApplication::startingUp())
return;
+ QHighDpiScaling::updateHighDpiScaling();
+
if (!e->screen)
return;