Fixed DCM-1615
[platform/framework/native/uifw.git] / src / ui / controls / FUiCtrl_Label.cpp
index 23e181e..afbdd2f 100644 (file)
@@ -567,7 +567,15 @@ _Label::GetContentSizeInternalF(void) const
        pTextObject->Compose();
        dimension = pTextObject->GetTextExtentF(0, pTextObject->GetTextLength());
 
-       contentRect.width = _ControlManager::GetInstance()->GetScreenSizeF().width;
+       _ControlOrientation orientation = GetOrientation();
+       if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+       {
+               contentRect.width = _ControlManager::GetInstance()->GetScreenSizeF().width;
+       }
+       else
+       {
+               contentRect.width = _ControlManager::GetInstance()->GetScreenSizeF().height;
+       }
 
        if (dimension.width > contentRect.width - GetBoundsF().x - __leftMargin * 2)
        {