summaryrefslogtreecommitdiffstats
path: root/src/layouts
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-01-16 13:47:50 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-01-16 13:48:15 +0100
commit7497dc48e674ee155aeebf0986be5a929ce15877 (patch)
tree87f575b7ce612b7130b91fd4c9b4e3dc437ff612 /src/layouts
parent46d983e08cdece92a62833dc74f37e2f11a66324 (diff)
parent5abfd7c00bc7ebfec2f059adc9bc22eb989ae10d (diff)
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: .qmake.conf tests/auto/controls/data/tst_stackview.qml Change-Id: I54b55d51452e812315f97bcdfd1a8e361a427f56
Diffstat (limited to 'src/layouts')
-rw-r--r--src/layouts/qquicklayoutstyleinfo.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/layouts/qquicklayoutstyleinfo.cpp b/src/layouts/qquicklayoutstyleinfo.cpp
index 1b9f2f577..144b14f00 100644
--- a/src/layouts/qquicklayoutstyleinfo.cpp
+++ b/src/layouts/qquicklayoutstyleinfo.cpp
@@ -44,11 +44,18 @@ QQuickLayoutStyleInfo::QQuickLayoutStyleInfo()
qreal QQuickLayoutStyleInfo::spacing(Qt::Orientation /*orientation*/) const
{
+#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS) || defined(Q_OS_BLACKBERRY) || defined(Q_OS_QNX) || defined(Q_OS_WINRT)
+ // On Android and iOS the default spacing between each UI element is 8dp
+ qreal spacing = 8.0;
+#else
qreal spacing = 5.0;
-#ifndef Q_OS_MAC
- // On mac the DPI is always 72 so we should not scale it
+#endif
+
+#ifndef Q_OS_OSX
+ // On OS X the DPI is always 72 so we should not scale it
spacing = qRound(spacing * (qreal(qt_defaultDpiX()) / 96.0));
#endif
+
return spacing;
}