Property::Map underlineMapSet;
Property::Map underlineMapGet;
- underlineMapSet.Insert( "enable", "true" );
- underlineMapSet.Insert( "color", "red" );
- underlineMapSet.Insert( "height", "1" );
+ underlineMapSet.Insert( "enable", true );
+ underlineMapSet.Insert( "color", Color::RED );
+ underlineMapSet.Insert( "height", 1 );
editor.SetProperty( TextEditor::Property::UNDERLINE, underlineMapSet );
// Check the input underline property
Property::Map underlineMapSet;
Property::Map underlineMapGet;
- underlineMapSet.Insert( "enable", "true" );
- underlineMapSet.Insert( "color", "blue" );
- underlineMapSet.Insert( "height", "2" );
+ underlineMapSet.Insert( "enable", true );
+ underlineMapSet.Insert( "color", Color::BLUE );
+ underlineMapSet.Insert( "height", 2 );
editor.SetProperty( TextEditor::Property::UNDERLINE, underlineMapSet );
underlineMapGet = editor.GetProperty<Property::Map>( TextEditor::Property::UNDERLINE );
Property::Map underlineMapSet;
Property::Map underlineMapGet;
- underlineMapSet.Insert( "enable", "true" );
- underlineMapSet.Insert( "color", "red" );
- underlineMapSet.Insert( "height", "1" );
+ underlineMapSet.Insert( "enable", true );
+ underlineMapSet.Insert( "color", Color::RED );
+ underlineMapSet.Insert( "height", 1 );
// Check the underline property
field.SetProperty( TextField::Property::UNDERLINE, underlineMapSet );
Property::Map underlineMapSet;
Property::Map underlineMapGet;
- underlineMapSet.Insert( "enable", "false" );
- underlineMapSet.Insert( "color", "blue" );
- underlineMapSet.Insert( "height", "0" );
+ underlineMapSet.Insert( "enable", false );
+ underlineMapSet.Insert( "color", Color::BLUE );
+ underlineMapSet.Insert( "height", 0 );
underlineMapGet = label.GetProperty<Property::Map>( TextLabel::Property::UNDERLINE );
DALI_TEST_EQUALS( underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION );
// Check the underline property
underlineMapSet.Clear();
- underlineMapSet.Insert( "enable", "true" );
- underlineMapSet.Insert( "color", "red" );
- underlineMapSet.Insert( "height", "1" );
+ underlineMapSet.Insert( "enable", true );
+ underlineMapSet.Insert( "color", Color::RED );
+ underlineMapSet.Insert( "height", 1 );
label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
DALI_TEST_EQUALS( DaliTestCheckMaps( underlineMapGet, underlineMapSet ), true, TEST_LOCATION );
underlineMapSet.Clear();
- underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::ENABLE, "true" );
- underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::COLOR, "green" );
- underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::HEIGHT, "2" );
+ underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::ENABLE, true );
+ underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::COLOR, Color::GREEN );
+ underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::HEIGHT, 2 );
label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
underlineMapSet.Clear();
Property::Map underlineDisabledMapGet;
- underlineDisabledMapGet.Insert( "enable", "false" );
- underlineDisabledMapGet.Insert( "color", "green" );
- underlineDisabledMapGet.Insert( "height", "2" );
+ underlineDisabledMapGet.Insert( "enable", false );
+ underlineDisabledMapGet.Insert( "color", Color::GREEN );
+ underlineDisabledMapGet.Insert( "height", 2 );
label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
label.SetProperty( TextLabel::Property::MULTI_LINE, true );
Property::Map underlineMap;
- underlineMap.Insert( "enable", "true" );
- underlineMap.Insert( "color", "red" );
+ underlineMap.Insert( "enable", true );
+ underlineMap.Insert( "color", Color::RED );
label.SetProperty( TextLabel::Property::UNDERLINE, underlineMap );
Property::Map shadowMap;
propertyMap.Insert( "shadow", shadowMapSet.Add("color", Color::RED).Add("offset", Vector2(2.0f, 2.0f)).Add("blurRadius", 3.0f) );
Property::Map underlineMapSet;
- propertyMap.Insert( "underline", underlineMapSet.Add("enable", "true").Add("color", "green").Add("height", "1") );
+ propertyMap.Insert( "underline", underlineMapSet.Add("enable", true).Add("color", Color::GREEN).Add("height", 1) );
Property::Map outlineMapSet;
propertyMap.Insert( "outline", outlineMapSet.Add("color", Color::YELLOW).Add("width", 1) );
{
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;
}