diff --git a/src/layouts/qquicklayoutstyleinfo.cpp b/src/layouts/qquicklayoutstyleinfo.cpp index 1b9f2f577753090675a31124156c5c2b0fb7e646..144b14f008925752790ff7ef81b57782e16d7d1e 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; }