Commit 89d67ca3 authored by J-P Nurmi's avatar J-P Nurmi
Browse files

Layouts: increase the default spacing on mobile platforms


Change-Id: I7aff0236a08465c05559bd8a2e8a60b556fbc4ba
Reviewed-by: default avatarMitch Curtis <mitch.curtis@digia.com>
Reviewed-by: default avatarGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Showing with 9 additions and 2 deletions
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment