From 66b456d959f09161fcb6df6df6f9b14034ac3a1f Mon Sep 17 00:00:00 2001 From: "keonpyo.kong" Date: Fri, 5 Apr 2013 20:15:26 +0900 Subject: [PATCH] fix defect in Update BuilderBounds Change-Id: Ia566fdca3ac0db5e3fe4535a4064633f94eb62b8 Signed-off-by: keonpyo.kong --- src/ui/FUi_ControlImpl.cpp | 71 +++++++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 26 deletions(-) diff --git a/src/ui/FUi_ControlImpl.cpp b/src/ui/FUi_ControlImpl.cpp index a516d08..09750a3 100755 --- a/src/ui/FUi_ControlImpl.cpp +++ b/src/ui/FUi_ControlImpl.cpp @@ -3559,33 +3559,52 @@ _ControlImpl::GetSizeF(void) const } void - _ControlImpl::UpdateBuilderBounds(const Tizen::Graphics::FloatRectangle& bounds) -{ - FloatRectangle builderBounds; - - _ControlOrientation controlOrientation = _CONTROL_ORIENTATION_PORTRAIT; - bool exist = GetBuilderBoundsF(controlOrientation, builderBounds); - if (exist) - { - if (IsAttachedToMainTree()) - { - controlOrientation = GetCore().GetOrientation(); - - if (controlOrientation == _CONTROL_ORIENTATION_LANDSCAPE) - { - SetBuilderBounds(_CONTROL_ORIENTATION_LANDSCAPE, bounds); - } - else - { +_ControlImpl::UpdateBuilderBounds(const Tizen::Graphics::FloatRectangle& bounds) +{ + FloatRectangle builderBounds; + _ControlOrientation controlOrientation = _CONTROL_ORIENTATION_PORTRAIT; + bool exist = GetBuilderBoundsF(controlOrientation, builderBounds); + if (exist) + { + if (IsAttachedToMainTree()) + { + _Window* pWindow = GetCore().GetRootWindow(); + if (pWindow->IsOrientationRoot()) + { + // Frame + _ControlImplManager* pControlImplManager = _ControlImplManager::GetInstance(); + OrientationStatus orientationStatus = pControlImplManager->GetFormOrientationStatus(this); + + if ((orientationStatus == ORIENTATION_STATUS_LANDSCAPE) || (orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE)) + { + controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE; + } + else + { + controlOrientation = _CONTROL_ORIENTATION_PORTRAIT; + } + } + else + { + // Window + controlOrientation = GetCore().GetOrientation(); + } + + if (controlOrientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + SetBuilderBounds(_CONTROL_ORIENTATION_LANDSCAPE, bounds); + } + else + { SetBuilderBounds(_CONTROL_ORIENTATION_PORTRAIT, bounds); - } - } - else - { - SetBuilderBounds(_CONTROL_ORIENTATION_PORTRAIT, bounds); - SetBuilderBounds(_CONTROL_ORIENTATION_LANDSCAPE, bounds); - } - } + } + } + else + { + SetBuilderBounds(_CONTROL_ORIENTATION_PORTRAIT, bounds); + SetBuilderBounds(_CONTROL_ORIENTATION_LANDSCAPE, bounds); + } + } } void -- 2.7.4