summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qscreen.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <[email protected]>2022-09-07 13:29:36 +0200
committerTor Arne Vestbø <[email protected]>2022-09-07 23:58:12 +0200
commit1032bf9fdb40a0bc37cafc2b9c54a50f539d32db (patch)
tree7f2b7db01aba64d62f735ea8ea448e32542f52a3 /src/gui/kernel/qscreen.cpp
parent778dcaa50d4cae65e2b8d4b57d05f52bf876135c (diff)
De-inline QScreenPrivate::updateHighDpi()
Make it easier to reason about the flow of high-DPI scaling when the implementation is not "hidden" away in a private header. Change-Id: I6350798c43ead213323f8e01d9761f2d185c6b00 Reviewed-by: Morten Johan Sørvig <[email protected]>
Diffstat (limited to 'src/gui/kernel/qscreen.cpp')
-rw-r--r--src/gui/kernel/qscreen.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
index 1e5db5c4d30..601d2f17184 100644
--- a/src/gui/kernel/qscreen.cpp
+++ b/src/gui/kernel/qscreen.cpp
@@ -89,6 +89,11 @@ void QScreenPrivate::setPlatformScreen(QPlatformScreen *screen)
updatePrimaryOrientation(); // derived from the geometry
}
+void QScreenPrivate::updateHighDpi()
+{
+ geometry = platformScreen->deviceIndependentGeometry();
+ availableGeometry = QHighDpi::fromNative(platformScreen->availableGeometry(), QHighDpiScaling::factor(platformScreen), geometry.topLeft());
+}
/*!
Destroys the screen.