{
if (IsAttachedToMainTree())
{
- _ControlImplManager* pControlImplManager = _ControlImplManager::GetInstance();
- OrientationStatus orientation = pControlImplManager->GetFormOrientationStatus(this);
+ controlOrientation = GetCore().GetOrientation();
- if (orientation == ORIENTATION_STATUS_NONE)
+ if (controlOrientation == _CONTROL_ORIENTATION_LANDSCAPE)
+ {
+ SetBuilderBounds(_CONTROL_ORIENTATION_LANDSCAPE, bounds);
+ }
+ else
{
- return;
- }
-
- if (orientation == ORIENTATION_STATUS_LANDSCAPE
- || orientation == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
- {
- SetBuilderBounds(_CONTROL_ORIENTATION_LANDSCAPE, bounds);
- }
- else
- {
- SetBuilderBounds(_CONTROL_ORIENTATION_PORTRAIT, bounds);
+ SetBuilderBounds(_CONTROL_ORIENTATION_PORTRAIT, bounds);
}
}
else
_ControlImpl::UpdateBuilderSize(const Tizen::Graphics::FloatDimension& dimension)
{
FloatRectangle builderBounds;
- _ControlOrientation controlOrientation = _CONTROL_ORIENTATION_PORTRAIT;
- _ControlImplManager* pControlImplManager = _ControlImplManager::GetInstance();
- OrientationStatus orientation = pControlImplManager->GetFormOrientationStatus(this);
-
- if (orientation == ORIENTATION_STATUS_LANDSCAPE
- || orientation == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
- {
- controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE;
- }
-
+ _ControlOrientation controlOrientation = GetCore().GetOrientation();
+
bool exist = GetBuilderBoundsF(controlOrientation, builderBounds);
if (exist)
{
{
orientation = pParentImpl->GetOrientationStatus();
}
- else
- {
- _PopupImpl* pPopImpl = dynamic_cast<Tizen::Ui::Controls::_PopupImpl*>(pTempControlImpl);
- Form* pForm = null;
- if (pPopImpl)
- {
- pForm = dynamic_cast<Tizen::Ui::Controls::Form*>(pPopImpl->GetOwner());
- if (pForm)
- {
- orientation = pForm->GetOrientationStatus();
- }
- }
- }
return orientation;
}
return false;
}
- _ControlImplManager* pControlImplManager = _ControlImplManager::GetInstance();
- OrientationStatus orientation = pControlImplManager->GetFormOrientationStatus(this);
+ controlOrientation = GetCore().GetOrientation();
- if (orientation == ORIENTATION_STATUS_LANDSCAPE
- || orientation == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ if (controlOrientation == _CONTROL_ORIENTATION_LANDSCAPE)
{
- controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE;
- this->GetBuilderBounds(controlOrientation, builderBounds);
+ GetBuilderBounds(controlOrientation, builderBounds);
}
-
rect = _CoordinateSystemUtils::ConvertToFloat(builderBounds);
return true;