TextModel - Layout a given range of characters inside a text.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-field-impl.cpp
index a0417df..981b228 100644 (file)
@@ -1089,9 +1089,11 @@ void TextField::RenderText()
 
   if( mRenderableActor )
   {
-    const Vector2 offset = mController->GetScrollPosition() + mController->GetAlignmentOffset();
+    // TODO: Scroll and alignment needs to be refactored.
+    const Vector2& alignmentOffset = mController->GetAlignmentOffset();
+    const Vector2& scrollOffset = mController->GetScrollPosition();
 
-    mRenderableActor.SetPosition( offset.x, offset.y );
+    mRenderableActor.SetPosition( scrollOffset.x, alignmentOffset.y + scrollOffset.y );
 
     Actor clipRootActor;
     if( mClipper )