Line spacing for TextLabel and vertical line alignment feature
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-editor-impl.cpp
index a75d703..77974d5 100644 (file)
@@ -511,8 +511,14 @@ void TextEditor::SetProperty( BaseObject* object, Property::Index index, const P
       {
         if( impl.mController )
         {
+
+          // The line spacing isn't supported by the TextEditor. Since it's supported
+          // by the TextLabel for now it must be ignored. The property is being shadowed
+          // locally so its value isn't affected.
           const float lineSpacing = value.Get<float>();
-          impl.mController->SetDefaultLineSpacing( lineSpacing );
+          impl.mLineSpacing = lineSpacing;
+          // set it to 0.0 due to missing implementation
+          impl.mController->SetDefaultLineSpacing( 0.0f );
           impl.mRenderer.Reset();
         }
         break;
@@ -973,7 +979,9 @@ Property::Value TextEditor::GetProperty( BaseObject* object, Property::Index ind
       {
         if( impl.mController )
         {
-          value = impl.mController->GetDefaultLineSpacing();
+          // LINE_SPACING isn't implemented for the TextEditor. Returning
+          // only shadowed value, not the real one.
+          value = impl.mLineSpacing;
         }
         break;
       }
@@ -1799,6 +1807,7 @@ TextEditor::TextEditor()
   mIdleCallback( NULL ),
   mAlignmentOffset( 0.f ),
   mScrollAnimationDuration( 0.f ),
+  mLineSpacing( 0.f ),
   mRenderingBackend( DEFAULT_RENDERING_BACKEND ),
   mHasBeenStaged( false ),
   mScrollAnimationEnabled( false ),