X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-effects-style.cpp;h=ea1b3cfcd67083550ff0862ed5b8b4bc311839c3;hp=8b71d3009b9d43404a3fc728c04980896e22ef34;hb=baef46c4babda42017ab2d5fbd362ae9e11be95b;hpb=ca4209fb071e5c353a7e528098a2e497765118d8 diff --git a/dali-toolkit/internal/text/text-effects-style.cpp b/dali-toolkit/internal/text/text-effects-style.cpp index 8b71d30..ea1b3cf 100755 --- a/dali-toolkit/internal/text/text-effects-style.cpp +++ b/dali-toolkit/internal/text/text-effects-style.cpp @@ -507,13 +507,26 @@ bool SetOutlineProperties( ControllerPtr controller, const Property::Value& valu bool empty = true; - if ( !propertiesMap.Empty() ) + if ( propertiesMap.Empty() ) + { + // Map empty so check if a string provided + // This is purely to maintain backward compatibility, but we don't parse the string to be a property map. + const std::string propertyString = value.Get(); + + // Stores the default outline's properties string to be recovered by the GetOutlineProperties() function. + controller->SetDefaultOutlineProperties( propertyString ); + + controller->OutlineSetByString( true ); + } + else { empty = ParseOutlineProperties( propertiesMap, colorDefined, color, widthDefined, width ); + + controller->OutlineSetByString( false ); } if( !empty ) @@ -563,22 +576,30 @@ void GetOutlineProperties( ControllerPtr controller, Property::Value& value, Eff { case EffectStyle::DEFAULT: { - const Vector4& color = controller->GetOutlineColor(); - const float width = controller->GetOutlineWidth(); + if ( controller->IsOutlineSetByString() ) + { + value = controller->GetDefaultOutlineProperties(); + break; + } + else + { + const Vector4& color = controller->GetOutlineColor(); + const float width = controller->GetOutlineWidth(); - Property::Map map; + Property::Map map; - std::string colorStr; - Vector4ToColorString( color, colorStr ); - map.Insert( COLOR_KEY, colorStr ); + std::string colorStr; + Vector4ToColorString( color, colorStr ); + map.Insert( COLOR_KEY, colorStr ); - std::string widthStr; - FloatToString( width, widthStr ); - map.Insert( WIDTH_KEY, widthStr ); + std::string widthStr; + FloatToString( width, widthStr ); + map.Insert( WIDTH_KEY, widthStr ); - value = map; + value = map; - break; + break; + } } case EffectStyle::INPUT: {