diff options
author | Sean Harmer <sean.harmer.qnx@kdab.com> | 2012-04-24 14:33:23 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-07 02:18:56 +0200 |
commit | d0e7014429ff40b535a07801679f5fc66cf7cf12 (patch) | |
tree | 8195e9b80b4eb2f2ae2fbb8fa6359bb12162161e | |
parent | e2a77de72615d8367caa0ff7123975b4321bde0e (diff) |
Query the screen physical size rather than assuming fixed dpi of 96
Change-Id: I405e8d1cfbf7f0607f8525f9c8c93053109478d9
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
-rw-r--r-- | src/plugins/platforms/qnx/qqnxscreen.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp index ea0c9e340f..25a1204b6f 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.cpp +++ b/src/plugins/platforms/qnx/qqnxscreen.cpp @@ -91,16 +91,7 @@ QQnxScreen::QQnxScreen(screen_context_t screenContext, screen_display_t display, qFatal("QQnxScreen: failed to query display physical size, errno=%d", errno); } - // Peg the DPI to 96 (for now) so fonts are a reasonable size. We'll want to match - // everything with a QStyle later, and at that point the physical size can be used - // instead. - { - static const int dpi = 96; - int width = m_currentGeometry.width() / dpi * qreal(25.4) ; - int height = m_currentGeometry.height() / dpi * qreal(25.4) ; - - m_currentPhysicalSize = m_initialPhysicalSize = QSize(width,height); - } + m_currentPhysicalSize = m_initialPhysicalSize = QSize(val[0], val[1]); // We only create the root window if we are the primary display. if (primaryScreen) |