summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-01-14 15:41:33 +0100
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-27 23:56:04 +0100
commit7150e8f51f44b6299728c5bdfb8cb5b54b8d1141 (patch)
tree3dc3b67c88a1786f3504412698b8be98ca45a0f6
parent16e8eca3621b89730f13e07c258fb8a4ae68a1ce (diff)
iOS: Use 72 DPI for font size conversion
This matches how UIKit behaves Change-Id: I13fd2578cac84e57b6be29c42ddee414b7ee9cb9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
-rw-r--r--src/plugins/platforms/ios/qiosscreen.h1
-rw-r--r--src/plugins/platforms/ios/qiosscreen.mm5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosscreen.h b/src/plugins/platforms/ios/qiosscreen.h
index 762c60e6da..bbc3eb7432 100644
--- a/src/plugins/platforms/ios/qiosscreen.h
+++ b/src/plugins/platforms/ios/qiosscreen.h
@@ -63,6 +63,7 @@ public:
int depth() const;
QImage::Format format() const;
QSizeF physicalSize() const;
+ QDpi logicalDpi() const;
Qt::ScreenOrientation nativeOrientation() const;
Qt::ScreenOrientation orientation() const;
diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm
index 5905f1630e..f3585407ce 100644
--- a/src/plugins/platforms/ios/qiosscreen.mm
+++ b/src/plugins/platforms/ios/qiosscreen.mm
@@ -178,6 +178,11 @@ QSizeF QIOSScreen::physicalSize() const
return m_physicalSize;
}
+QDpi QIOSScreen::logicalDpi() const
+{
+ return QDpi(72, 72);
+}
+
Qt::ScreenOrientation QIOSScreen::nativeOrientation() const
{
return Qt::PortraitOrientation;