Apply new indicator UI.
[platform/framework/native/uifw.git] / src / ui / controls / FUiCtrl_FormImpl.cpp
index 095e044..3512884 100644 (file)
@@ -296,9 +296,21 @@ _FormImpl::SetFormStyle(unsigned long formStyle)
 
        if (FORM_STYLE_INDICATOR & formStyle)
        {
+               GetCore().SetIndicatorShowState(true);
                indicatorBounds = GetCore().GetIndicatorBoundsF();
                r = GetLastResult();
                SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       }
+       else if(FORM_STYLE_INDICATOR_AUTO_HIDE & formStyle)
+       {
+               r = GetCore().SetIndicatorShowState(false, true);
+               SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+       }
+       else
+       {
+               r = GetCore().SetIndicatorShowState(false);
+               SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
        }
 
        if (formStyle & FORM_STYLE_HEADER)
@@ -348,6 +360,10 @@ _FormImpl::SetFormStyle(unsigned long formStyle)
                }
        }
 
+       _Indicator* pIndicator = GetCore().GetIndicator();
+       r = GetCore().AttachSystemChild(*pIndicator);
+       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
        if (formStyle & FORM_STYLE_TEXT_TAB)
        {
                float titleHeight = 0.0f;
@@ -1040,7 +1056,15 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation)
                _Indicator* pIndicator = GetCore().GetIndicator();
                if (pIndicator)
                {
-                       pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight));
+                       if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+                       {
+                               pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight));
+                       }
+                       else
+                       {
+                               GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetCore().GetOrientation(), indicatorheight);
+                               pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight));
+                       }
                }
                GetCore().AdjustClientBounds();
        }