From 7d2cfbe5aa1e67d12010a66481625c9d40f0c174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 30 Sep 2011 14:25:43 +0200 Subject: Improved logical and physical DPI APIs. Made physicalSize() return QSizeF instead, to prevent rounding errors. Added logicalSize() as the base to compute font pixel sizes instead, and added convenience functions in QScreen to access the logical and physical sizes and DPI metrics. Task-number: QTBUG-21736 Task-number: QTBUG-21737 Change-Id: Ic705dc98eb3632617659e65a0c9a552673dc0c65 Reviewed-on: http://codereview.qt-project.org/5888 Reviewed-by: Qt Sanity Bot Reviewed-by: Friedemann Kleint --- src/plugins/platforms/openwfd/qopenwfdscreen.cpp | 4 ++-- src/plugins/platforms/openwfd/qopenwfdscreen.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/platforms/openwfd') diff --git a/src/plugins/platforms/openwfd/qopenwfdscreen.cpp b/src/plugins/platforms/openwfd/qopenwfdscreen.cpp index 785bee9c55..0d3361899b 100644 --- a/src/plugins/platforms/openwfd/qopenwfdscreen.cpp +++ b/src/plugins/platforms/openwfd/qopenwfdscreen.cpp @@ -112,9 +112,9 @@ QImage::Format QOpenWFDScreen::format() const return QImage::Format_RGB32; } -QSize QOpenWFDScreen::physicalSize() const +QSizeF QOpenWFDScreen::physicalSize() const { - return mPort->physicalSize().toSize(); + return mPort->physicalSize(); } QOpenWFDPort * QOpenWFDScreen::port() const diff --git a/src/plugins/platforms/openwfd/qopenwfdscreen.h b/src/plugins/platforms/openwfd/qopenwfdscreen.h index bb23744ac4..fc65e504ac 100644 --- a/src/plugins/platforms/openwfd/qopenwfdscreen.h +++ b/src/plugins/platforms/openwfd/qopenwfdscreen.h @@ -64,7 +64,7 @@ public: QRect geometry() const; int depth() const; QImage::Format format() const; - QSize physicalSize() const; + QSizeF physicalSize() const; QOpenWFDPort *port() const; -- cgit v1.2.3