From d3695df6b7a823cfd718b1a1ae8ac5fd9f724524 Mon Sep 17 00:00:00 2001 From: Keuckdo Bang Date: Mon, 3 Jun 2013 11:18:36 +0900 Subject: [PATCH] Fixed indicator bug. Change-Id: I72029834b97e9e2fe894504a4b614dbfe2797341 --- src/ui/controls/FUiCtrl_FormImpl.cpp | 7 +++++-- src/ui/controls/FUiCtrl_Indicator.cpp | 6 +++--- src/ui/inc/FUiCtrl_Indicator.h | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/ui/controls/FUiCtrl_FormImpl.cpp b/src/ui/controls/FUiCtrl_FormImpl.cpp index db0fdb3..bb6d394 100644 --- a/src/ui/controls/FUiCtrl_FormImpl.cpp +++ b/src/ui/controls/FUiCtrl_FormImpl.cpp @@ -1206,9 +1206,9 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation) float indicatorheight = 0.0f; GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetCore().GetOrientation(), indicatorheight); + _Indicator* pIndicator = GetCore().GetIndicator(); if (GetCore().HasIndicator()) { - _Indicator* pIndicator = GetCore().GetIndicator(); if (pIndicator) { if (orientation == _CONTROL_ORIENTATION_PORTRAIT) @@ -1221,9 +1221,12 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation) pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight)); } } - pIndicator->OnChangeLayout(orientation); GetCore().AdjustClientBounds(); } + if (pIndicator) + { + pIndicator->OnChangeLayout(orientation); + } float adjHeight = 0.0f; diff --git a/src/ui/controls/FUiCtrl_Indicator.cpp b/src/ui/controls/FUiCtrl_Indicator.cpp index d2975e2..777694a 100644 --- a/src/ui/controls/FUiCtrl_Indicator.cpp +++ b/src/ui/controls/FUiCtrl_Indicator.cpp @@ -94,6 +94,7 @@ _Indicator::_Indicator(void) , __pWindow(null) , __showstate(false) , __opacity(_INDICATOR_OPACITY_OPAQUE) + , __orientation(_CONTROL_ORIENTATION_PORTRAIT) { } @@ -153,9 +154,7 @@ _Indicator::SetIndicatorOpacity(_IndicatorOpacity opacity) } else if (opacity == _INDICATOR_OPACITY_TRANSLUCENT) { - _ControlOrientation orientation = __pWindow->GetOrientation(); - - if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) { Color bgColor(0x7f000000); SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f)); @@ -365,6 +364,7 @@ _Indicator::OnChangeLayout(_ControlOrientation orientation) ChangeCurrentVisualElement(__pLandscapeVisualElement); SetClipChildrenEnabled(false); } + __orientation = orientation; SetIndicatorOpacity(__opacity); _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); diff --git a/src/ui/inc/FUiCtrl_Indicator.h b/src/ui/inc/FUiCtrl_Indicator.h index c42af3b..76fd916 100644 --- a/src/ui/inc/FUiCtrl_Indicator.h +++ b/src/ui/inc/FUiCtrl_Indicator.h @@ -85,6 +85,7 @@ private: _Window* __pWindow; bool __showstate; _IndicatorOpacity __opacity; + Tizen::Ui::_ControlOrientation __orientation; }; // _Indicator -- 2.7.4