From: Keuckdo Bang Date: Mon, 8 Jul 2013 09:28:49 +0000 (+0900) Subject: Fixed jira and plm issue. X-Git-Tag: submit/tizen_2.2/20130714.153149~88 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ce12c79fc56c472f538ce38696e349688a4c238;p=framework%2Fosp%2Fuifw.git Fixed jira and plm issue. Change-Id: Ie3cb2b6d76bcc5e6666ded2884caab7fceb97237 --- diff --git a/src/ui/controls/FUiCtrl_Form.cpp b/src/ui/controls/FUiCtrl_Form.cpp index 085a9e9..7ec06f2 100644 --- a/src/ui/controls/FUiCtrl_Form.cpp +++ b/src/ui/controls/FUiCtrl_Form.cpp @@ -3157,6 +3157,7 @@ _Form::AttachedToMainTree(void) } else { + __pIndicator->SetWindow(GetRootWindow()); r = SetIndicatorShowState(false); SetIndicatorAutoHide(false, false); SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/controls/FUiCtrl_FormImpl.cpp b/src/ui/controls/FUiCtrl_FormImpl.cpp index ae4e508..f7c238a 100644 --- a/src/ui/controls/FUiCtrl_FormImpl.cpp +++ b/src/ui/controls/FUiCtrl_FormImpl.cpp @@ -1230,6 +1230,7 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation) { if (pIndicator) { + pIndicator->SetIndicatorOrientation(orientation); if (orientation == _CONTROL_ORIENTATION_PORTRAIT) { pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight)); @@ -1286,7 +1287,7 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation) { if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle()) { - adjHeight = 0.0f; + indicatorBounds.height = 0.0f; } } } diff --git a/src/ui/controls/FUiCtrl_Indicator.cpp b/src/ui/controls/FUiCtrl_Indicator.cpp index 29fe16e..2ed2ff6 100644 --- a/src/ui/controls/FUiCtrl_Indicator.cpp +++ b/src/ui/controls/FUiCtrl_Indicator.cpp @@ -432,8 +432,6 @@ _Indicator::OnChangeLayout(_ControlOrientation orientation) win = (Ecore_X_Window)__pWindow->GetNativeHandle(); } - __orientation = orientation; - if (orientation == _CONTROL_ORIENTATION_PORTRAIT) { ChangeCurrentVisualElement(__pPortraitVisualElement); @@ -683,13 +681,51 @@ _Indicator::OnHitTest(const Tizen::Graphics::FloatPoint& point) } _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*this->__pCurrentVisualElement); - _EflVisualElementSurfaceImpl* pSurface = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pImpl->GetNativeNode()->GetSurface())); - Evas_Object* pImageObject = (Evas_Object*)pSurface->GetNativeHandle(); + Evas_Object* pImageObject = null; + if (pImpl) + { + _EflNode* pNativeNode = dynamic_cast< _EflNode* >(pImpl->GetNativeNode()); + if (pNativeNode) + { + VisualElementSurface* pPortraitSurface = pNativeNode->GetSurface(); + if (pPortraitSurface) + { + _EflVisualElementSurfaceImpl* pSurface = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pPortraitSurface)); + if (pSurface) + { + pImageObject = (Evas_Object*)pSurface->GetNativeHandle(); + } + } + } + } - if (!evas_object_repeat_events_get(pImageObject)) - return HIT_TEST_MATCH; + if (pImageObject) + { + if (!evas_object_repeat_events_get(pImageObject)) + { + return HIT_TEST_MATCH; + } + else + { + return HIT_TEST_NOWHERE; + } + } else + { return HIT_TEST_NOWHERE; + } +} + +void +_Indicator::SetIndicatorOrientation(Tizen::Ui::_ControlOrientation orientation) +{ + __orientation = orientation; +} + +void +_Indicator::SetWindow(_Window* pWindow) +{ + __pWindow = pWindow; } }}} // Tizen::Ui::Controls diff --git a/src/ui/inc/FUiCtrl_Indicator.h b/src/ui/inc/FUiCtrl_Indicator.h index 1c9e3d7..4890b65 100644 --- a/src/ui/inc/FUiCtrl_Indicator.h +++ b/src/ui/inc/FUiCtrl_Indicator.h @@ -67,6 +67,9 @@ public: Tizen::Graphics::Rectangle GetIndicatorBounds(void) const; Tizen::Graphics::FloatRectangle GetIndicatorBoundsF(void) const; + void SetIndicatorOrientation(Tizen::Ui::_ControlOrientation orientation); + void SetWindow(Tizen::Ui::_Window* pWindow); + void OnChangeLayout(_ControlOrientation orientation); result OnAttachedToMainTree(void); virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);