From: Keuckdo Bang Date: Thu, 4 Apr 2013 05:05:27 +0000 (+0900) Subject: Behavior of SetActionBarsTranslucent() was fixed. X-Git-Tag: accepted/tizen_2.1/20130425.033138~465^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=558aaad40ec501b08700f5528680353c71cd4057;p=framework%2Fosp%2Fuifw.git Behavior of SetActionBarsTranslucent() was fixed. Change-Id: I696ecc84489334185ccec8a251dd8a3d103c9e17 --- diff --git a/src/ui/controls/FUiCtrl_Form.cpp b/src/ui/controls/FUiCtrl_Form.cpp index 49617cc..8624342 100644 --- a/src/ui/controls/FUiCtrl_Form.cpp +++ b/src/ui/controls/FUiCtrl_Form.cpp @@ -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(); diff --git a/src/ui/controls/FUiCtrl_FormImpl.cpp b/src/ui/controls/FUiCtrl_FormImpl.cpp index adfc023..4562b58 100644 --- a/src/ui/controls/FUiCtrl_FormImpl.cpp +++ b/src/ui/controls/FUiCtrl_FormImpl.cpp @@ -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); }