/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
#include <dali-toolkit/internal/text/text-effects-style.h>
// INTERNAL INCLUDES
+#include <dali-toolkit/devel-api/controls/text-controls/text-style-properties-devel.h>
#include <dali-toolkit/internal/text/markup-processor-helper-functions.h>
#include <dali-toolkit/internal/text/property-string-parser.h>
{
const KeyValuePair& valueGet = shadowPropertiesMap.GetKeyValue( index );
- if( COLOR_KEY == valueGet.first.stringKey )
+ if( ( DevelText::Shadow::Property::COLOR == valueGet.first.indexKey ) || ( COLOR_KEY == valueGet.first.stringKey ) )
{
/// Color key.
colorDefined = true;
color = valueGet.second.Get<Vector4>();
}
}
- else if( OFFSET_KEY == valueGet.first.stringKey )
+ else if( ( DevelText::Shadow::Property::OFFSET == valueGet.first.indexKey ) || ( OFFSET_KEY == valueGet.first.stringKey ) )
{
/// Offset key.
offsetDefined = true;
offset = valueGet.second.Get<Vector2>();
}
}
- else if( BLUR_RADIUS_KEY == valueGet.first.stringKey )
+ else if( ( DevelText::Shadow::Property::BLUR_RADIUS == valueGet.first.indexKey ) || ( BLUR_RADIUS_KEY == valueGet.first.stringKey ) )
{
/// Blur radius key.
blurRadiusDefined = true;
{
const KeyValuePair& valueGet = underlinePropertiesMap.GetKeyValue( index );
- if( ENABLE_KEY == valueGet.first.stringKey )
+ if( ( DevelText::Underline::Property::ENABLE == valueGet.first.indexKey ) || ( ENABLE_KEY == valueGet.first.stringKey ) )
{
/// Enable key.
if( valueGet.second.GetType() == Dali::Property::STRING )
enabled = valueGet.second.Get<bool>();
}
}
- else if( COLOR_KEY == valueGet.first.stringKey )
+ else if( ( DevelText::Underline::Property::COLOR == valueGet.first.indexKey ) || ( COLOR_KEY == valueGet.first.stringKey ) )
{
/// Color key.
colorDefined = true;
color = valueGet.second.Get<Vector4>();
}
}
- else if( HEIGHT_KEY == valueGet.first.stringKey )
+ else if( ( DevelText::Underline::Property::HEIGHT == valueGet.first.indexKey ) || ( HEIGHT_KEY == valueGet.first.stringKey ) )
{
/// Height key.
heightDefined = true;
bool& colorDefined,
Vector4& color,
bool& widthDefined,
- unsigned int& width )
+ uint16_t& width )
{
const unsigned int numberOfItems = underlinePropertiesMap.Count();
{
const KeyValuePair& valueGet = underlinePropertiesMap.GetKeyValue( index );
- if( COLOR_KEY == valueGet.first.stringKey )
+ if( ( DevelText::Outline::Property::COLOR == valueGet.first.indexKey ) || ( COLOR_KEY == valueGet.first.stringKey ) )
{
/// Color key.
colorDefined = true;
color = valueGet.second.Get<Vector4>();
}
- else if( WIDTH_KEY == valueGet.first.stringKey )
+ else if( ( DevelText::Outline::Property::WIDTH == valueGet.first.indexKey ) || ( WIDTH_KEY == valueGet.first.stringKey ) )
{
/// Width key.
widthDefined = true;
- width = static_cast<unsigned int>( valueGet.second.Get<float>() );
+ width = static_cast<uint16_t>( valueGet.second.Get<float>() );
}
}
{
const KeyValuePair& valueGet = backgroundProperties.GetKeyValue( index );
- if( ENABLE_KEY == valueGet.first.stringKey )
+ if( ( DevelText::Background::Property::ENABLE == valueGet.first.indexKey ) || ( ENABLE_KEY == valueGet.first.stringKey ) )
{
/// Enable key.
enabled = valueGet.second.Get<bool>();
}
- else if( COLOR_KEY == valueGet.first.stringKey )
+ else if( ( DevelText::Background::Property::COLOR == valueGet.first.indexKey ) || ( COLOR_KEY == valueGet.first.stringKey ) )
{
/// Color key.
colorDefined = true;
{
Property::Map map;
- const std::string enabledStr = enabled ? TRUE_TOKEN : FALSE_TOKEN;
- map.Insert( ENABLE_KEY, enabledStr );
-
- std::string colorStr;
- Vector4ToColorString( color, colorStr );
- map.Insert( COLOR_KEY, colorStr );
-
- std::string heightStr;
- FloatToString( height, heightStr );
- map.Insert( HEIGHT_KEY, heightStr );
+ map.Insert( ENABLE_KEY, enabled );
+ map.Insert( COLOR_KEY, color );
+ map.Insert( HEIGHT_KEY, height );
value = map;
}
bool colorDefined = false;
Vector4 color;
bool widthDefined = false;
- unsigned int width = 0u;
+ uint16_t width = 0u;
bool empty = true;
else
{
const Vector4& color = controller->GetOutlineColor();
- const unsigned int width = controller->GetOutlineWidth();
+ const uint16_t width = controller->GetOutlineWidth();
Property::Map map;
map.Insert( COLOR_KEY, color );