TextModel - Layout a given range of characters inside a text.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-editor-impl.cpp
index a029c83..f0c3fc6 100644 (file)
@@ -883,9 +883,11 @@ void TextEditor::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 )