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=fb272bc37de2b981be7bb3ea29d4882ce0f88149;hb=98b0c47a996d12828edbda14a61b841a273d3439;hpb=0d07bc303ad28647afa1342319721384cc37d19f 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 fb272bc..d40cd76 100755 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp @@ -20,9 +20,10 @@ // EXTERNAL INCLUDES #include -#include +#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 ) )