From b6b26421a1029b18b48b69dbdac4bb70fb622604 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 20 Jul 2023 08:19:52 +0200 Subject: split Point/Size/Rectangle into AbsoluteScreenPixel* types to attempt to make it obvious in code what kind of coordinate system we are dealing with. The idea is that by doing this, the compile-time type checking will flush out inconsistencies between different code. I started with vcl::Window::OutputToAbsoluteScreenPixel and worked outwards from there. Change-Id: Ia967d7a0bb38886695f3a761b85c8b9340ddb1c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154676 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/qt5/QtSystem.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vcl/qt5/QtSystem.cxx') diff --git a/vcl/qt5/QtSystem.cxx b/vcl/qt5/QtSystem.cxx index 5f5f4ad284e5..d43e47832faa 100644 --- a/vcl/qt5/QtSystem.cxx +++ b/vcl/qt5/QtSystem.cxx @@ -16,10 +16,10 @@ unsigned int QtSystem::GetDisplayScreenCount() { return QGuiApplication::screens().size(); } -tools::Rectangle QtSystem::GetDisplayScreenPosSizePixel(unsigned int nScreen) +AbsoluteScreenPixelRectangle QtSystem::GetDisplayScreenPosSizePixel(unsigned int nScreen) { QRect qRect = QGuiApplication::screens().at(nScreen)->geometry(); - return toRectangle(scaledQRect(qRect, qApp->devicePixelRatio())); + return AbsoluteScreenPixelRectangle(toRectangle(scaledQRect(qRect, qApp->devicePixelRatio()))); } int QtSystem::ShowNativeDialog(const OUString&, const OUString&, const std::vector&) -- cgit