Remove alignment from text controller.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-field-impl.cpp
index ef00fc3..48ae1fe 100644 (file)
@@ -24,7 +24,7 @@
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/images/resource-image.h>
 #include <dali/devel-api/adaptor-framework/virtual-keyboard.h>
-#include <dali/devel-api/object/type-registry-helper.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
@@ -1029,7 +1029,7 @@ void TextField::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::
     case StyleChange::DEFAULT_FONT_CHANGE:
     {
       DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnStyleChange DEFAULT_FONT_CHANGE\n");
-      std::string newFont = styleManager.GetDefaultFontFamily();
+      const std::string& newFont = GetImpl( styleManager ).GetDefaultFontFamily();
       // Property system did not set the font so should update it.
       mController->UpdateAfterFontChange( newFont );
       break;
@@ -1105,11 +1105,9 @@ void TextField::RenderText()
 
   if( mRenderableActor )
   {
-    // TODO: Scroll and alignment needs to be refactored.
-    const Vector2& alignmentOffset = mController->GetAlignmentOffset();
     const Vector2& scrollOffset = mController->GetScrollPosition();
 
-    mRenderableActor.SetPosition( scrollOffset.x, alignmentOffset.y + scrollOffset.y );
+    mRenderableActor.SetPosition( scrollOffset.x, scrollOffset.y );
 
     Actor clipRootActor;
     if( mClipper )