From 7f1fad5f231311af4477fa26cc240bb2a312240c Mon Sep 17 00:00:00 2001 From: Park Kyoung Hee Date: Mon, 15 Apr 2013 15:38:59 +0900 Subject: [PATCH] modify scrolling effect on ScrollPanel Change-Id: I25b6a908e912e2f4e0eacebe7fcaea817adc30d9 Signed-off-by: Park Kyoung Hee --- src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp | 46 +++++++++---------- src/ui/controls/FUiCtrl_ScrollPresenter.cpp | 56 ++++++++++++------------ 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp b/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp index 94c1cda..b8df571 100755 --- a/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp @@ -1080,29 +1080,6 @@ _ScrollPanelPresenter::DoFlickGestureRecognized(_TouchFlickGestureDetector& gest } } -float -_ScrollPanelPresenter::CalculateFlickAmount(float flickDistance, float flickDuration) -{ - if (_FloatCompare(flickDistance, 0.0f)) - { - return 0.0f; - } - else if (flickDistance < 0.0) - { - return -SCROLL_PANEL_FIXED_FLICK_AMOUNT; - } - else - { - return SCROLL_PANEL_FIXED_FLICK_AMOUNT; - } -} - -bool -_ScrollPanelPresenter::AccumulateFlickGesture(_FlickDirection direction) -{ - return false; -} - bool _ScrollPanelPresenter::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) { @@ -2004,5 +1981,28 @@ _ScrollPanelPresenter::IsScrollAnimationRunning(void) const return __scrollAnimationRunning; } +float +_ScrollPanelPresenter::CalculateFlickAmount(float flickDistance, float flickDuration) +{ + if (_FloatCompare(flickDistance, 0.0f)) + { + return 0.0f; + } + else if (flickDistance < 0.0) + { + return -SCROLL_PANEL_FIXED_FLICK_AMOUNT; + } + else + { + return SCROLL_PANEL_FIXED_FLICK_AMOUNT; + } +} + +bool +_ScrollPanelPresenter::AccumulateFlickGesture(_FlickDirection direction) +{ + return false; +} + }}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ScrollPresenter.cpp b/src/ui/controls/FUiCtrl_ScrollPresenter.cpp index f47c8ab..c20f538 100755 --- a/src/ui/controls/FUiCtrl_ScrollPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ScrollPresenter.cpp @@ -397,20 +397,6 @@ _ScrollPresenter::SetScrollPosition(float scrollPosition) return r; } -result -_ScrollPresenter::SetScrollingEffect() -{ - if ((__enableScrollingEffect || __enableOverScrollingEffect) && __scrollingEffectVisibility) - { - if (__pFrontScrollingEffectVe->GetOpacity() != SCROLL_OPACITY_DARK_DIM && !__fadeOut) - { - SetScrollingEffectOpacity(SCROLL_OPACITY_DARK_DIM); - } - } - - return E_SUCCESS; -} - float _ScrollPresenter::GetScrollPosition(void) const { @@ -440,7 +426,7 @@ _ScrollPresenter::IsOnFadeEffect(void) const void _ScrollPresenter::EnableScrollingEffect(bool enable) { - __enableScrollingEffect = false; + __enableScrollingEffect = enable; } bool @@ -1864,19 +1850,6 @@ _ScrollPresenter::RelayoutScrollChildren(_ScrollDirection scrollDirection) return E_SUCCESS; } -result -_ScrollPresenter::SetParentBouncing(float rate) -{ - if (rate == __parentBouncingRate) - { - return E_SUCCESS; - } - - __parentBouncingRate = rate; - - return E_SUCCESS; -} - void _ScrollPresenter::DrawThumb(void) { @@ -2354,4 +2327,31 @@ _ScrollPresenter::GetControl(void) const return *__pScrollCtrl; } +result +_ScrollPresenter::SetScrollingEffect() +{ + if ((__enableScrollingEffect || __enableOverScrollingEffect) && __scrollingEffectVisibility) + { + if (__pFrontScrollingEffectVe->GetOpacity() != SCROLL_OPACITY_DARK_DIM && !__fadeOut) + { + SetScrollingEffectOpacity(SCROLL_OPACITY_DARK_DIM); + } + } + + return E_SUCCESS; +} + +result +_ScrollPresenter::SetParentBouncing(float rate) +{ + if (rate == __parentBouncingRate) + { + return E_SUCCESS; + } + + __parentBouncingRate = rate; + + return E_SUCCESS; +} + }}} // Tizen::Ui::Controls -- 2.7.4