summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbscreen.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-09-30 14:25:43 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-06 09:36:39 +0200
commit7d2cfbe5aa1e67d12010a66481625c9d40f0c174 (patch)
tree26734132827c40ba425d79481c2c4193bac5c5ea /src/plugins/platforms/xcb/qxcbscreen.cpp
parent29948e666583a26966ddb97faf4808099824b80d (diff)
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 <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbscreen.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index d9583160d7..386dbdc49f 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -222,9 +222,9 @@ QImage::Format QXcbScreen::format() const
return QImage::Format_RGB32;
}
-QSize QXcbScreen::physicalSize() const
+QSizeF QXcbScreen::physicalSize() const
{
- return QSize(m_screen->width_in_millimeters, m_screen->height_in_millimeters);
+ return QSizeF(m_screen->width_in_millimeters, m_screen->height_in_millimeters);
}
int QXcbScreen::screenNumber() const