Behavior of SetActionBarsTranslucent() was fixed.
authorKeuckdo Bang <keuckdo.bang@samsung.net>
Thu, 4 Apr 2013 05:05:27 +0000 (14:05 +0900)
committerKeuckdo Bang <keuckdo.bang@samsung.net>
Thu, 4 Apr 2013 05:05:27 +0000 (14:05 +0900)
Change-Id: I696ecc84489334185ccec8a251dd8a3d103c9e17

src/ui/controls/FUiCtrl_Form.cpp
src/ui/controls/FUiCtrl_FormImpl.cpp

index 49617cc..8624342 100644 (file)
@@ -1290,8 +1290,31 @@ _Form::SetActionBarsTranslucent(unsigned long actionBars, bool translucent)
                {
                        if (IsIndicatorTranslucent())
                        {
-                               r = SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE);
-                               SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+                               FloatRectangle bounds(0.0f, 0.0f, GetClientBoundsF().width, __pHeader->GetBoundsF().height);
+                               SetHeaderBounds(bounds);
+                       }
+                       else
+                       {
+                               FloatRectangle bounds(0.0f, GetIndicatorBoundsF().height, GetClientBoundsF().width, __pHeader->GetBoundsF().height);
+                               SetHeaderBounds(bounds);
+                       }
+               }
+               else if (!IsIndicatorTranslucent() && !IsHeaderTranslucent())
+               {
+                               FloatRectangle bounds(0.0f, GetIndicatorBoundsF().height, GetClientBoundsF().width, __pHeader->GetBoundsF().height);
+                               SetHeaderBounds(bounds);
+               }
+               else
+               {
+                       if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+                       {
+                               FloatRectangle bounds(0.0f, GetIndicatorBoundsF().height, GetClientBoundsF().width, __pHeader->GetBoundsF().height);
+                               SetHeaderBounds(bounds);
+                       }
+                       else
+                       {
+                               FloatRectangle bounds(0.0f, 0.0f, GetClientBoundsF().width, __pHeader->GetBoundsF().height);
+                               SetHeaderBounds(bounds);
                        }
                }
        }
@@ -1353,6 +1376,21 @@ _Form::SetActionBarsVisible(unsigned long actionBars, bool visible)
                                        {
                                                FloatRectangle indicatorBounds = GetIndicatorBoundsF();
                                                adjHeight = indicatorBounds.height;
+
+                                               if (IsIndicatorTranslucent())
+                                               {
+                                                       if (!IsHeaderTranslucent())
+                                                       {
+                                                               adjHeight = 0.0f;
+                                                       }
+                                                       else
+                                                       {
+                                                               if (GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE)
+                                                               {
+                                                                       adjHeight = 0.0f;
+                                                               }
+                                                       }
+                                               }
                                        }
                                        FloatRectangle bounds = __pHeader->GetBoundsF();
                                        bounds.y = adjHeight;
@@ -2315,6 +2353,21 @@ _Form::OnChildVisibleStateChanged(const _Control& child)
                {
                        FloatRectangle indicatorBounds = GetIndicatorBoundsF();
                        adjHeight = indicatorBounds.height;
+
+                       if (IsIndicatorTranslucent())
+                       {
+                               if (!IsHeaderTranslucent())
+                               {
+                                       adjHeight = 0.0f;
+                               }
+                               else
+                               {
+                                       if (GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE)
+                                       {
+                                               adjHeight = 0.0f;
+                                       }
+                               }
+                       }
                }
                FloatRectangle bounds = __pHeader->GetBoundsF();
                bounds.y = adjHeight;
@@ -2698,6 +2751,20 @@ _Form::OnBoundsChanged(void)
                if (IsIndicatorVisible())
                {
                        indicatorFloatBounds = GetIndicatorBoundsF();
+                       if (IsIndicatorTranslucent())
+                       {
+                               if (!IsHeaderTranslucent())
+                               {
+                                       indicatorFloatBounds.height = 0.0f;
+                               }
+                               else
+                               {
+                                       if (GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE)
+                                       {
+                                               indicatorFloatBounds.height = 0.0f;
+                                       }
+                               }
+                       }
                }
 
                toolbarBounds = GetHeader()->GetBoundsF();
index adfc023..4562b58 100644 (file)
@@ -330,6 +330,21 @@ _FormImpl::SetFormStyle(unsigned long formStyle)
                        GetCore().SetHeader(&pHeader->GetCore());
                        GetCore().AdjustClientBounds();
 
+                       if (GetCore().IsIndicatorTranslucent())
+                       {
+                               if (!GetCore().IsHeaderTranslucent())
+                               {
+                                       indicatorBounds.height = 0.0f;
+                               }
+                               else
+                               {
+                                       if (GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE)
+                                       {
+                                               indicatorBounds.height = 0.0f;
+                                       }
+                               }
+                       }
+
                        FloatRectangle bounds(0.0f, indicatorBounds.height, GetClientBoundsF().width, GetCore().GetToolbarHeightF(true));
                        GetCore().SetHeaderBounds(bounds);
 
@@ -1119,6 +1134,20 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation)
                if (GetCore().IsIndicatorVisible())
                {
                        indicatorBounds = GetCore().GetIndicatorBoundsF();
+                       if (GetCore().IsIndicatorTranslucent())
+                       {
+                               if (!GetCore().IsHeaderTranslucent())
+                               {
+                                       indicatorBounds.height = 0.0f;
+                               }
+                               else
+                               {
+                                       if (orientation == _CONTROL_ORIENTATION_LANDSCAPE)
+                                       {
+                                               indicatorBounds.height = 0.0f;
+                                       }
+                               }
+                       }
                }
 
                FloatRectangle bounds(0.0f, indicatorBounds.height, GetClientBoundsF().width, GetCore().GetToolbarHeightF(true));
@@ -1356,6 +1385,20 @@ _FormImpl::OnAttachedToMainTree(void)
 
        if (pHeader)
        {
+               if (GetCore().IsIndicatorTranslucent())
+               {
+                       if (!GetCore().IsHeaderTranslucent())
+                       {
+                               indicatorBounds.height = 0.0f;
+                       }
+                       else
+                       {
+                               if (GetCore().GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE)
+                               {
+                                       indicatorBounds.height = 0.0f;
+                               }
+                       }
+               }
                FloatRectangle bounds(0.0f, indicatorBounds.height, GetClientBoundsF().width, GetCore().GetToolbarHeightF(true));
                GetCore().SetHeaderBounds(bounds);
        }