Fixed indicator bug.
authorKeuckdo Bang <keuckdo.bang@samsung.net>
Mon, 3 Jun 2013 02:18:36 +0000 (11:18 +0900)
committerKeuckdo Bang <keuckdo.bang@samsung.net>
Mon, 3 Jun 2013 02:18:36 +0000 (11:18 +0900)
Change-Id: I72029834b97e9e2fe894504a4b614dbfe2797341

src/ui/controls/FUiCtrl_FormImpl.cpp
src/ui/controls/FUiCtrl_Indicator.cpp
src/ui/inc/FUiCtrl_Indicator.h

index db0fdb3..bb6d394 100644 (file)
@@ -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;
index d2975e2..777694a 100644 (file)
@@ -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();
index c42af3b..76fd916 100644 (file)
@@ -85,6 +85,7 @@ private:
                _Window* __pWindow;
                bool __showstate;
                _IndicatorOpacity __opacity;
+               Tizen::Ui::_ControlOrientation __orientation;
 
 }; // _Indicator