If the flickableDirection property is AutoFlickDirection Flickable
compares qreals for equality to decide whether to lock flicking in one
direction. This is too restrictive since the content size could have
rounding errors withing the one pixel range resulting from pixel
alignment and float calculations.
Flickable should consider the content width/height equal to its
width/height if their difference is within the one pixel range.
Change-Id: Id3bff33d6f798860c62c699a6c2795213efe233d
Reviewed-by: Martin Jones <martin.jones@nokia.com>
{
Q_D(const QQuickFlickable);
if (d->flickableDirection == QQuickFlickable::AutoFlickDirection)
- return vWidth() != width();
+ return floor(qAbs(vWidth() - width()));
return d->flickableDirection & QQuickFlickable::HorizontalFlick;
}
{
Q_D(const QQuickFlickable);
if (d->flickableDirection == QQuickFlickable::AutoFlickDirection)
- return vHeight() != height();
+ return floor(qAbs(vHeight() - height()));
return d->flickableDirection & QQuickFlickable::VerticalFlick;
}