X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Ftext%2Ftext-visual.cpp;h=1d7563454f7500acc61f37601780a7af12d2ba60;hp=a3057c3172503a965969395ba5f8537a7088f815;hb=593ab514474062b4d3de55682e63627a79b2eb5a;hpb=2ffec8b73989656f70411ef1a99a721b6f86cd14 diff --git a/dali-toolkit/internal/visuals/text/text-visual.cpp b/dali-toolkit/internal/visuals/text/text-visual.cpp index a3057c3..1d75634 100755 --- a/dali-toolkit/internal/visuals/text/text-visual.cpp +++ b/dali-toolkit/internal/visuals/text/text-visual.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -421,7 +422,7 @@ void TextVisual::DoSetProperties( const Property::Map& propertyMap ) engine.SetCursorWidth( 0u ); // Do not layout space for the cursor. } -void TextVisual::DoSetOnStage( Actor& actor ) +void TextVisual::DoSetOnScene( Actor& actor ) { mControl = actor; @@ -476,7 +477,7 @@ void TextVisual::RemoveRenderer( Actor& actor ) mRendererList.clear(); } -void TextVisual::DoSetOffStage( Actor& actor ) +void TextVisual::DoSetOffScene( Actor& actor ) { RemoveRenderer( actor ); @@ -619,7 +620,16 @@ void TextVisual::UpdateRenderer() return; } - Dali::LayoutDirection::Type layoutDirection = static_cast( control.GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get() ); + + Dali::LayoutDirection::Type layoutDirection; + if( mController->IsMatchSystemLanguageDirection() ) + { + layoutDirection = static_cast( DevelWindow::Get( control ).GetRootLayer().GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get() ); + } + else + { + layoutDirection = static_cast( control.GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get() ); + } const Text::Controller::UpdateTextType updateTextType = mController->Relayout( relayoutSize, layoutDirection ); @@ -820,8 +830,11 @@ void TextVisual::AddRenderer( Actor& actor, const Vector2& size, bool hasMultipl // Get the current offset for recalculate the offset when tiling. Property::Map retMap; mImpl->mTransform.GetPropertyMap( retMap ); - Vector2 offSet = retMap.Find( Dali::Toolkit::Visual::Transform::Property::OFFSET )->Get< Vector2 >(); - info.offSet = offSet; + Property::Value* offsetValue = retMap.Find( Dali::Toolkit::Visual::Transform::Property::OFFSET ); + if( offsetValue ) + { + offsetValue->Get( info.offSet ); + } // Create a textureset in the default renderer. CreateTextureSet( info, mImpl->mRenderer, sampler, hasMultipleTextColors, containsColorGlyph, styleEnabled );