diff options
author | Eike Ziller <eike.ziller@nokia.com> | 2012-08-15 10:19:51 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-23 08:24:22 (GMT) |
commit | c84ac8de9c6502caaa8cbdc8fbc2de3029a40afc (patch) | |
tree | f35e687d645a40b4a29a60bbe3b8f2fa083bc9fe /src/plugins | |
parent | 485edb4ec1f231b70eb5e2fa5a6e1ef584011e36 (diff) | |
download | Qt-c84ac8de9c6502caaa8cbdc8fbc2de3029a40afc.zip Qt-c84ac8de9c6502caaa8cbdc8fbc2de3029a40afc.tar.gz Qt-c84ac8de9c6502caaa8cbdc8fbc2de3029a40afc.tar.bz2 |
uikit: Fix missing point to pixel conversions
Qt wants drag distance and font size in pixels.
Change-Id: I363ed9ab8bcfdcddbfd168fc81b71c4184ecfa5c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/uikit/quikitscreen.mm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/platforms/uikit/quikitscreen.mm b/src/plugins/platforms/uikit/quikitscreen.mm index 1a874b1..a35a3cd 100644 --- a/src/plugins/platforms/uikit/quikitscreen.mm +++ b/src/plugins/platforms/uikit/quikitscreen.mm @@ -65,17 +65,17 @@ QUIKitScreen::QUIKitScreen(int screenIndex) m_depth = 24; const qreal inch = 25.4; - qreal dpi = 160.; - int dragDistance = 12; + qreal unscaledDpi = 160.; + int dragDistance = 12 * scale; if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { - dpi = 132.; - dragDistance = 10; + unscaledDpi = 132.; + dragDistance = 10 * scale; } - m_physicalSize = QSize(qRound(bounds.size.width * inch / dpi), qRound(bounds.size.height * inch / dpi)); + m_physicalSize = QSize(qRound(bounds.size.width * inch / unscaledDpi), qRound(bounds.size.height * inch / unscaledDpi)); qApp->setStartDragDistance(dragDistance); QFont font; // system font is helvetica, so that is fine already - font.setPixelSize([UIFont systemFontSize]); + font.setPixelSize([UIFont systemFontSize] * scale); qApp->setFont(font); [pool release]; |