Allow a gentle left-right pan to switch homescreen pages.
mAxisAutoLockGradient(Toolkit::ScrollView::DEFAULT_AXIS_AUTO_LOCK_GRADIENT),
mFrictionCoefficient(Toolkit::ScrollView::DEFAULT_FRICTION_COEFFICIENT),
mFlickSpeedCoefficient(Toolkit::ScrollView::DEFAULT_FLICK_SPEED_COEFFICIENT),
mAxisAutoLockGradient(Toolkit::ScrollView::DEFAULT_AXIS_AUTO_LOCK_GRADIENT),
mFrictionCoefficient(Toolkit::ScrollView::DEFAULT_FRICTION_COEFFICIENT),
mFlickSpeedCoefficient(Toolkit::ScrollView::DEFAULT_FLICK_SPEED_COEFFICIENT),
- mMaxFlickSpeed(Toolkit::ScrollView::DEFAULT_MAX_FLICK_SPEED)
+ mMaxFlickSpeed(Toolkit::ScrollView::DEFAULT_MAX_FLICK_SPEED),
+ mInAccessibilityPan(false)
{
SetRequiresMouseWheelEvents(true);
}
{
SetRequiresMouseWheelEvents(true);
}
- if(speed2 > flickSpeedThreshold2) // exceeds flick threshold
+ if( speed2 > flickSpeedThreshold2 || // exceeds flick threshold
+ mInAccessibilityPan ) // With AccessibilityPan its easier to move between snap positions
{
if((angle >= -orthoAngleRange) && (angle < orthoAngleRange)) // Swiping East
{
{
if((angle >= -orthoAngleRange) && (angle < orthoAngleRange)) // Swiping East
{
- if(speed2 > flickSpeedThreshold2) // exceeds flick threshold
+ if( speed2 > flickSpeedThreshold2 || // exceeds flick threshold
+ mInAccessibilityPan ) // With AccessibilityPan its easier to move between snap positions
{
if((angle >= M_PI_2-orthoAngleRange) && (angle < M_PI_2+orthoAngleRange)) // Swiping South
{
{
if((angle >= M_PI_2-orthoAngleRange) && (angle < M_PI_2+orthoAngleRange)) // Swiping South
{
bool ScrollView::OnAccessibilityPan(PanGesture gesture)
{
bool ScrollView::OnAccessibilityPan(PanGesture gesture)
{
+ // Keep track of whether this is an AccessibilityPan
+ mInAccessibilityPan = true;
+ mInAccessibilityPan = false;
+
ScrollOvershootIndicatorPtr mOvershootIndicator;
Toolkit::ScrollView::SnapStartedSignalV2 mSnapStartedSignalV2;
ScrollOvershootIndicatorPtr mOvershootIndicator;
Toolkit::ScrollView::SnapStartedSignalV2 mSnapStartedSignalV2;
+
+ bool mInAccessibilityPan : 1; // With AccessibilityPan its easier to move between snap positions
};
} // namespace Internal
};
} // namespace Internal