}
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