Fixed DCM-1615
authorKeuckdo Bang <keuckdo.bang@samsung.net>
Fri, 10 May 2013 06:08:07 +0000 (15:08 +0900)
committerKeuckdo Bang <keuckdo.bang@samsung.net>
Fri, 10 May 2013 06:08:07 +0000 (15:08 +0900)
Change-Id: I1c2c85c2df7261cefbac17534e38aa8781d8e5c2

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)
        {