X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-label-impl.cpp;h=d40cd7601523a022747f86d10d01651b96af1689;hp=c175cb2b49e1574b5efb1bebff79037f88c6f47b;hb=a7c4e86e15b7eef5b0d50b12f6da4b1c650b8c33;hpb=946461ac1b49e996d9155c95130ec5aa1b08f77d diff --git a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp index c175cb2..d40cd76 100755 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include // INTERNAL INCLUDES @@ -926,7 +927,7 @@ float TextLabel::GetHeightForWidth( float width ) return mController->GetHeightForWidth( width ) + padding.top + padding.bottom; } -void TextLabel::OnPropertySet( Property::Index index, Property::Value propertyValue ) +void TextLabel::OnPropertySet( Property::Index index, const Property::Value& propertyValue ) { DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextLabel::OnPropertySet index[%d]\n", index ); @@ -966,8 +967,15 @@ void TextLabel::OnRelayout( const Vector2& size, RelayoutContainer& container ) } // Support Right-To-Left - Dali::LayoutDirection::Type layoutDirection = static_cast( Self().GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get() ); - + Dali::LayoutDirection::Type layoutDirection; + if( mController->IsMatchSystemLanguageDirection() ) + { + layoutDirection = static_cast( DevelWindow::Get( Self() ).GetRootLayer().GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get() ); + } + else + { + layoutDirection = static_cast( Self().GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get() ); + } const Text::Controller::UpdateTextType updateTextType = mController->Relayout( contentSize, layoutDirection ); if( ( Text::Controller::NONE_UPDATED != ( Text::Controller::MODEL_UPDATED & updateTextType ) )