From 379e52aa04a8bb7c343cb21553eb2caa979cc7e8 Mon Sep 17 00:00:00 2001 From: Syed Khaja Moinuddin Date: Mon, 18 Mar 2013 11:12:37 +0900 Subject: [PATCH] Fix in DateTimeBar related to consuming the OnTouch events and OnTouchMoved requirement. Signed-off-by: Syed Khaja Moinuddin Change-Id: I48f68c25920ae3a1cb46be6144ec9b96570646c7 --- src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp b/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp index a87dca7..9a8c458 100644 --- a/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp +++ b/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp @@ -936,7 +936,7 @@ _DateTimeBarPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false) { __isFlickEnabled = false; - return false; + return true; } if (__isFlickInProgress) @@ -968,6 +968,16 @@ _DateTimeBarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& return false; } + if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false && !__isFlickInProgress && !__isTouchMoved) + { + __isTouchMoved = false; + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP); + __pDateTimeBar->SetVisibleState(false); + __pDateTimeBar->Close(); + ResetFlickAnimationTimer(); + return true; + } + int index = GetItemIndexFromPosition(touchinfo.GetCurrentPosition()); bool isEventFire = true; @@ -985,15 +995,6 @@ _DateTimeBarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& __isTouchMoved = false; __distance = 0.0f; - if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false && !__isFlickInProgress) - { - PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP); - __pDateTimeBar->SetVisibleState(false); - __pDateTimeBar->Close(); - ResetFlickAnimationTimer(); - return false; - } - __pDateTimeBar->Invalidate(); if (isEventFire == true) @@ -1038,7 +1039,7 @@ _DateTimeBarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& to if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false || __touchMoveHandled == true) { - return false; + return true; } _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); -- 2.7.4