Merge "Patch to synchronize with bug fixes done in Tizen 2.4 MCD branch." into devel...
authorPaul Wisbey <p.wisbey@samsung.com>
Wed, 31 Aug 2016 10:00:54 +0000 (03:00 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 31 Aug 2016 10:00:54 +0000 (03:00 -0700)
15 files changed:
automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp
automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp
build/tizen/docs/dali.doxy.in
dali-toolkit/devel-api/builder/tree-node.cpp
dali-toolkit/devel-api/builder/tree-node.h
dali-toolkit/internal/builder/builder-get-is.inl.h
dali-toolkit/internal/builder/builder-impl.cpp
dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp
dali-toolkit/internal/styling/style-manager-impl.cpp
dali-toolkit/internal/visuals/primitive/primitive-visual.cpp
dali-toolkit/public-api/visuals/primitive-visual-properties.h
dali-toolkit/styles/1920x1080/dali-toolkit-default-theme.json
dali-toolkit/styles/480x800/dali-toolkit-default-theme.json
dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json
docs/content/shared-javascript-and-cpp-documentation/visuals.md

index b061cf1..6de8e23 100644 (file)
@@ -744,7 +744,7 @@ int UtcDaliVisualGetPropertyMap9(void)
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
   propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CUBE );
-  propertyMap.Insert( PrimitiveVisual::Property::COLOR, color );
+  propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, color );
   propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
   propertyMap.Insert( PrimitiveVisual::Property::STACKS, 20 );
   propertyMap.Insert( PrimitiveVisual::Property::SCALE_TOP_RADIUS, 30.0f );
@@ -769,7 +769,7 @@ int UtcDaliVisualGetPropertyMap9(void)
   DALI_TEST_CHECK( value );
   DALI_TEST_EQUALS( value->Get<int>(), (int)PrimitiveVisual::Shape::CUBE, TEST_LOCATION );
 
-  value = resultMap.Find( PrimitiveVisual::Property::COLOR, Property::VECTOR4 );
+  value = resultMap.Find( PrimitiveVisual::Property::MIX_COLOR, Property::VECTOR4 );
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<Vector4>() == color );
   DALI_TEST_EQUALS( value->Get<Vector4>(), color, Math::MACHINE_EPSILON_100, TEST_LOCATION );
@@ -1043,7 +1043,7 @@ int UtcDaliVisualAnimatePrimitiveVisual(void)
   DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
 
   Renderer renderer = actor.GetRendererAt(0);
-  Property::Index index = renderer.GetPropertyIndex( PrimitiveVisual::Property::COLOR );
+  Property::Index index = renderer.GetPropertyIndex( PrimitiveVisual::Property::MIX_COLOR );
 
   // The property isn't registered on the renderer, it's instead registered on the shader.
   DALI_TEST_EQUALS( index, Property::INVALID_INDEX, TEST_LOCATION );
index 79b2f69..fe4c588 100644 (file)
@@ -1531,7 +1531,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual2(void)
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
   propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CUBE );
-  propertyMap.Insert( PrimitiveVisual::Property::COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+  propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
   propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
   propertyMap.Insert( PrimitiveVisual::Property::STACKS, 20 );
   propertyMap.Insert( PrimitiveVisual::Property::SCALE_TOP_RADIUS, 30.0f );
@@ -1560,7 +1560,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual3(void)
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
   propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
-  propertyMap.Insert( PrimitiveVisual::Property::COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+  propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
   propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
   propertyMap.Insert( PrimitiveVisual::Property::STACKS, 20 );
 
@@ -1582,7 +1582,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual4(void)
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
   propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CONICAL_FRUSTRUM );
-  propertyMap.Insert( PrimitiveVisual::Property::COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+  propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
   propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
   propertyMap.Insert( PrimitiveVisual::Property::SCALE_TOP_RADIUS, 30.0f );
   propertyMap.Insert( PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS, 40.0f );
@@ -1606,7 +1606,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual5(void)
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
   propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::BEVELLED_CUBE );
-  propertyMap.Insert( PrimitiveVisual::Property::COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+  propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
   propertyMap.Insert( PrimitiveVisual::Property::BEVEL_PERCENTAGE, 0.7f );
 
   //Test to see if shape loads correctly.
@@ -1627,7 +1627,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual6(void)
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
   propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::OCTAHEDRON );
-  propertyMap.Insert( PrimitiveVisual::Property::COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+  propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
 
   //Test to see if shape loads correctly.
   TestPrimitiveVisualWithProperties( propertyMap, application );
@@ -1647,7 +1647,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual7(void)
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
   propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CONE );
-  propertyMap.Insert( PrimitiveVisual::Property::COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+  propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
   propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
   propertyMap.Insert( PrimitiveVisual::Property::SCALE_TOP_RADIUS, 30.0f );
   propertyMap.Insert( PrimitiveVisual::Property::SCALE_HEIGHT, 50.0f );
@@ -1670,7 +1670,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual8(void)
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
   propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
-  propertyMap.Insert( PrimitiveVisual::Property::COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+  propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
   propertyMap.Insert( MeshVisual::Property::LIGHT_POSITION, Vector3( 0.0, 1.0, 2.0 ) );
 
   //Test to see if shape loads correctly.
@@ -1679,6 +1679,186 @@ int UtcDaliVisualFactoryGetPrimitiveVisual8(void)
   END_TEST;
 }
 
+//Test if primitive shape loads correctly when told to use too many slices.
+int UtcDaliVisualFactoryGetPrimitiveVisual9(void)
+{
+  //Set up test application first, so everything else can be handled.
+  ToolkitTestApplication application;
+
+  tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual9:  Request primitive visual with above-cap slices." );
+
+  //Set up visual properties.
+  Property::Map propertyMap;
+  propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+  propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
+  propertyMap.Insert( PrimitiveVisual::Property::SLICES, Property::Value( 1000000 ) );
+
+  //Test to see if shape loads correctly.
+  TestPrimitiveVisualWithProperties( propertyMap, application );
+
+  END_TEST;
+}
+
+//Test if primitive shape loads correctly when told to use too few slices. (2 slices or less.)
+int UtcDaliVisualFactoryGetPrimitiveVisual10(void)
+{
+  //Set up test application first, so everything else can be handled.
+  ToolkitTestApplication application;
+
+  tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual10:  Request primitive visual with too few slices." );
+
+  //Set up visual properties.
+  Property::Map propertyMap;
+  propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+  propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
+  propertyMap.Insert( PrimitiveVisual::Property::SLICES, Property::Value( 2 ) );
+
+  //Test to see if shape loads correctly.
+  TestPrimitiveVisualWithProperties( propertyMap, application );
+
+  END_TEST;
+}
+
+//Test if primitive shape loads correctly when told to use too many stacks.
+int UtcDaliVisualFactoryGetPrimitiveVisual11(void)
+{
+  //Set up test application first, so everything else can be handled.
+  ToolkitTestApplication application;
+
+  tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual11:  Request primitive visual with too many stacks." );
+
+  //Set up visual properties.
+  Property::Map propertyMap;
+  propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+  propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
+  propertyMap.Insert( PrimitiveVisual::Property::STACKS, Property::Value( 1000000 ) );
+
+  //Test to see if shape loads correctly.
+  TestPrimitiveVisualWithProperties( propertyMap, application );
+
+  END_TEST;
+}
+
+//Test if primitive shape loads correctly when told to use too few stacks. (1 stack or less.)
+int UtcDaliVisualFactoryGetPrimitiveVisual12(void)
+{
+  //Set up test application first, so everything else can be handled.
+  ToolkitTestApplication application;
+
+  tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual12:  Request primitive visual with too few stacks." );
+
+  //Set up visual properties.
+  Property::Map propertyMap;
+  propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+  propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
+  propertyMap.Insert( PrimitiveVisual::Property::STACKS, Property::Value( 1 ) );
+
+  //Test to see if shape loads correctly.
+  TestPrimitiveVisualWithProperties( propertyMap, application );
+
+  END_TEST;
+}
+
+//Test if primitive shape loads correctly when told to use invalid (zero or negative) dimensions.
+int UtcDaliVisualFactoryGetPrimitiveVisual13(void)
+{
+  //Set up test application first, so everything else can be handled.
+  ToolkitTestApplication application;
+
+  tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual13:  Request primitive visual with invalid scale dimensions." );
+
+  //Set up visual properties.
+  Property::Map propertyMap;
+  propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+  propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
+  propertyMap.Insert( PrimitiveVisual::Property::SCALE_DIMENSIONS, Vector3::ZERO );
+
+  //Test to see if shape loads correctly.
+  TestPrimitiveVisualWithProperties( propertyMap, application );
+
+  END_TEST;
+}
+
+//Test if primitive shape loads correctly when told to use too low a bevel percentage.
+int UtcDaliVisualFactoryGetPrimitiveVisual14(void)
+{
+  //Set up test application first, so everything else can be handled.
+  ToolkitTestApplication application;
+
+  tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual14:  Request primitive visual with too low a bevel percentage." );
+
+  //Set up visual properties.
+  Property::Map propertyMap;
+  propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+  propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
+  propertyMap.Insert( PrimitiveVisual::Property::BEVEL_PERCENTAGE, Property::Value( -1.0f ) );
+
+  //Test to see if shape loads correctly.
+  TestPrimitiveVisualWithProperties( propertyMap, application );
+
+  END_TEST;
+}
+
+//Test if primitive shape loads correctly when told to use too high a bevel percentage.
+int UtcDaliVisualFactoryGetPrimitiveVisual15(void)
+{
+  //Set up test application first, so everything else can be handled.
+  ToolkitTestApplication application;
+
+  tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual15:  Request primitive visual with too high a bevel percentage." );
+
+  //Set up visual properties.
+  Property::Map propertyMap;
+  propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+  propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
+  propertyMap.Insert( PrimitiveVisual::Property::BEVEL_PERCENTAGE, Property::Value( 2.0f ) );
+
+  //Test to see if shape loads correctly.
+  TestPrimitiveVisualWithProperties( propertyMap, application );
+
+  END_TEST;
+}
+
+//Test if primitive shape loads correctly when told to use too low a bevel smoothness.
+int UtcDaliVisualFactoryGetPrimitiveVisual16(void)
+{
+  //Set up test application first, so everything else can be handled.
+  ToolkitTestApplication application;
+
+  tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual16:  Request primitive visual with too low a bevel smoothness." );
+
+  //Set up visual properties.
+  Property::Map propertyMap;
+  propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+  propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
+  propertyMap.Insert( PrimitiveVisual::Property::BEVEL_SMOOTHNESS, Property::Value( -1.0f ) );
+
+  //Test to see if shape loads correctly.
+  TestPrimitiveVisualWithProperties( propertyMap, application );
+
+  END_TEST;
+}
+
+//Test if primitive shape loads correctly when told to use too high a bevel smoothness.
+int UtcDaliVisualFactoryGetPrimitiveVisual17(void)
+{
+  //Set up test application first, so everything else can be handled.
+  ToolkitTestApplication application;
+
+  tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual17:  Request primitive visual with too high a bevel smoothness." );
+
+  //Set up visual properties.
+  Property::Map propertyMap;
+  propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
+  propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
+  propertyMap.Insert( PrimitiveVisual::Property::BEVEL_SMOOTHNESS, Property::Value( 2.0f ) );
+
+  //Test to see if shape loads correctly.
+  TestPrimitiveVisualWithProperties( propertyMap, application );
+
+  END_TEST;
+}
+
 //Test if primitive shape visual handles the case of not being passed a specific shape to use.
 int UtcDaliVisualFactoryGetPrimitiveVisualN1(void)
 {
index 791c8dd..0fedbc6 100644 (file)
@@ -352,7 +352,10 @@ ALIASES += DEPRECATED_1_2="@deprecated Deprecated since 1.2"
 
 ALIASES += PLATFORM=""
 ALIASES += PRIVLEVEL_PLATFORM=""
+ALIASES += PRIVLEVEL_PUBLIC=""
 ALIASES += PRIVILEGE_KEYGRAB=""
+ALIASES += PRIVILEGE_DISPLAY=""
+ALIASES += REMARK_INTERNET=""
 
 ############################################
 ## For Tizen Native API Reference
@@ -366,7 +369,10 @@ ALIASES += PRIVILEGE_KEYGRAB=""
 
 #ALIASES += PLATFORM="@platform"
 #ALIASES += PRIVLEVEL_PLATFORM="\par Privilege Level:\n platform"
+#ALIASES += PRIVLEVEL_PUBLIC="\par Privilege Level:\n public"
 #ALIASES += PRIVILEGE_KEYGRAB="\par Privilege:\n http://tizen.org/privilege/keygrab"
+#ALIASES += PRIVILEGE_DISPLAY="\par Privilege:\n http://tizen.org/privilege/display"
+#ALIASES += REMARK_INTERNET="@remarks %http://tizen.org/privilege/internet is needed if @a url is a http or https address."
 
 
 # This tag can be used to specify a number of word-keyword mappings (TCL only).
index 302c7a2..6b0f6b3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
 
 // EXTERNAL INCLUDES
 #include <cstring>
+#include <algorithm>
 
 // INTERNAL INCLUDES
 #include "dali-toolkit/devel-api/builder/tree-node.h"
 #include "dali-toolkit/internal/builder/tree-node-manipulator.h"
 
+namespace
+{
+
+bool CaseInsensitiveCharacterCompare( unsigned char a, unsigned char b )
+{
+  // Converts to lower case in the current locale.
+  return std::tolower( a ) == std::tolower( b );
+}
+
+/**
+ * return true if the lower cased ASCII strings are equal.
+ */
+bool CaseInsensitiveStringCompare( const std::string& a, const std::string& b )
+{
+  bool result = false;
+  if( a.length() == b.length() )
+  {
+    result = std::equal( a.begin(), a.end(), b.begin(), CaseInsensitiveCharacterCompare );
+  }
+  return result;
+}
+
+} // anonymous namespace
+
+
 namespace Dali
 {
 
@@ -80,7 +106,6 @@ bool TreeNode::GetBoolean() const
   return mIntValue == 1 ? true : false;
 }
 
-
 size_t TreeNode::Size() const
 {
   size_t c = 0;
@@ -120,6 +145,25 @@ const TreeNode* TreeNode::GetChild(const std::string& childName) const
   return NULL;
 }
 
+
+const TreeNode* TreeNode::GetChildIgnoreCase(const std::string& childName) const
+{
+  const TreeNode* p = mFirstChild;
+  while(p)
+  {
+    if(p->mName)
+    {
+      std::string nodeName(p->mName);
+      if( CaseInsensitiveStringCompare( nodeName, childName) )
+      {
+        return p;
+      }
+    }
+    p = p->mNextSibling;
+  }
+  return NULL;
+}
+
 const TreeNode* TreeNode::Find(const std::string& childName) const
 {
   if(mName && std::string(mName) == childName)
index 3e47aea..c63bf1f 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_SCRIPT_TREE_NODE_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
@@ -182,13 +182,20 @@ public:
   bool HasSubstitution() const;
 
   /*
-   * Gets a child of the node
-   * @param name The name of the child
+   * Gets a child of the node (using case sensitive matching)
+   * @param name The name of the child.
    * @return The child if found, else NULL
    */
   const TreeNode* GetChild(const std::string& name) const;
 
   /*
+   * Gets a child of the node (using case insensitive matching)
+   * @param name The name of the child in lower case
+   * @return The child if found, else NULL
+   */
+  const TreeNode* GetChildIgnoreCase(const std::string& name) const;
+
+  /*
    * Recursively search for a child of the node
    * @param name The name of the child
    * @return The child if found, else NULL
index d13b70b..ae17837 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TOOLKIT_INTERNAL_BUILDER_GET_IS_INL__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
@@ -41,11 +41,36 @@ inline OptionalChild IsChild(const TreeNode* node, const std::string& childName)
   }
 }
 
+inline OptionalChild IsChildIgnoreCase(const TreeNode* node, const std::string& childName)
+{
+  if( node )
+  {
+    const TreeNode* c = node->GetChildIgnoreCase(childName);
+    if( NULL != c )
+    {
+      return OptionalChild( *c );
+    }
+    else
+    {
+      return OptionalChild();
+    }
+  }
+  else
+  {
+    return OptionalChild();
+  }
+}
+
 inline OptionalChild IsChild(const TreeNode& node, const std::string& childName)
 {
   return IsChild(&node, childName);
 }
 
+inline OptionalChild IsChildIgnoreCase(const TreeNode& node, const std::string& childName)
+{
+  return IsChildIgnoreCase(&node, childName);
+}
+
 inline OptionalString IsString(const OptionalChild& node)
 {
   if( node && (*node).GetType() == TreeNode::STRING )
index 8203437..de3fbe1 100644 (file)
@@ -117,7 +117,7 @@ void CollectAllStyles( const TreeNode& stylesCollection, const TreeNode& style,
     {
       if( OptionalString styleName = IsString( (*iter).second ) )
       {
-        if( OptionalChild node = IsChild( stylesCollection, *styleName) )
+        if( OptionalChild node = IsChildIgnoreCase( stylesCollection, *styleName) )
         {
           styleList.push_back( &(*node) );
 
@@ -1231,7 +1231,9 @@ bool Builder::ApplyStyle( const std::string& styleName, Handle& handle, const Re
   DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
 
   OptionalChild styles = IsChild( *mParser.GetRoot(), KEYNAME_STYLES );
-  OptionalChild style  = IsChild( *styles, styleName );
+
+  std::string styleNameLower(styleName);
+  OptionalChild style  = IsChildIgnoreCase( *styles, styleNameLower );
 
   if( styles && style )
   {
index 1633dc9..2248668 100644 (file)
@@ -49,7 +49,7 @@ namespace
 // todo Move this to adaptor??
 #define GET_LOCALE_TEXT(string) dgettext("dali-toolkit", string)
 
-const std::string TEXT_SELECTION_POPUP_BUTTON_STYLE_NAME( "textselectionpopupbutton" );
+const std::string TEXT_SELECTION_POPUP_BUTTON_STYLE_NAME( "TextSelectionPopupButton" );
 const Dali::Vector4 DEFAULT_OPTION_PRESSED_COLOR( Dali::Vector4( 0.24f, 0.72f, 0.8f, 1.0f ) );
 
 #if defined(DEBUG_ENABLED)
@@ -836,5 +836,3 @@ TextSelectionPopup::~TextSelectionPopup()
 } // namespace Toolkit
 
 } // namespace Dali
-
-
index 7e08cf4..d1fa388 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
@@ -35,7 +35,7 @@ namespace
 
 const char* LANDSCAPE_QUALIFIER = "landscape";
 const char* PORTRAIT_QUALIFIER  = "portrait";
-const char* FONT_SIZE_QUALIFIER = "FontSize";
+const char* FONT_SIZE_QUALIFIER = "fontsize";
 
 const char* DEFAULT_THEME = DALI_STYLE_DIR "dali-toolkit-default-theme.json";
 
@@ -332,9 +332,7 @@ void StyleManager::ApplyStyle( Toolkit::Builder builder, Toolkit::Control contro
 
   if( styleName.empty() )
   {
-    // Convert control name to lower case
     styleName = control.GetTypeName();
-    std::transform( styleName.begin(), styleName.end(), styleName.begin(), ::tolower );
   }
 
   // Apply the style after choosing the correct actual style (e.g. landscape or portrait)
index 1955db5..c85a7a0 100644 (file)
@@ -53,7 +53,7 @@ DALI_ENUM_TO_STRING_TABLE_END( SHAPE_TYPE )
 
 //Property names
 const char * const PRIMITIVE_SHAPE( "shape" );
-const char * const SHAPE_COLOR( "shapeColor" );
+const char * const SHAPE_COLOR( "mixColor" );
 const char * const SLICES( "slices" );
 const char * const STACKS( "stacks" );
 const char * const SCALE_TOP_RADIUS( "scaleTopRadius" );
@@ -77,8 +77,8 @@ const float   DEFAULT_BEVEL_SMOOTHNESS =    0.0; ///< For bevelled cubes
 const Vector4 DEFAULT_COLOR =               Vector4( 0.5, 0.5, 0.5, 0.0 ); ///< Grey, for all.
 
 //Property limits
-const int   MIN_SLICES =           1;   ///< Minimum number of slices for spheres and conics
-const int   MIN_STACKS =           1;   ///< Minimum number of stacks for spheres and conics
+const int   MIN_SLICES =           3;   ///< Minimum number of slices for spheres and conics
+const int   MIN_STACKS =           2;   ///< Minimum number of stacks for spheres and conics
 const int   MAX_PARTITIONS =       255; ///< Maximum number of slices or stacks for spheres and conics
 const float MIN_BEVEL_PERCENTAGE = 0.0; ///< Minimum bevel percentage for bevelled cubes
 const float MAX_BEVEL_PERCENTAGE = 1.0; ///< Maximum bevel percentage for bevelled cubes
@@ -195,7 +195,7 @@ void PrimitiveVisual::DoInitialize( Actor& actor, const Property::Map& propertyM
 
   //Read in other potential properties.
 
-  Property::Value* color = propertyMap.Find( Toolkit::PrimitiveVisual::Property::COLOR, SHAPE_COLOR );
+  Property::Value* color = propertyMap.Find( Toolkit::PrimitiveVisual::Property::MIX_COLOR, SHAPE_COLOR );
   if( color && !color->Get( mColor ) )
   {
     DALI_LOG_ERROR( "Invalid type for color in PrimitiveVisual.\n" );
@@ -210,10 +210,12 @@ void PrimitiveVisual::DoInitialize( Actor& actor, const Property::Map& propertyM
       if( mSlices > MAX_PARTITIONS )
       {
         mSlices = MAX_PARTITIONS;
+        DALI_LOG_WARNING( "Value for slices clamped.\n" );
       }
       else if ( mSlices < MIN_SLICES )
       {
         mSlices = MIN_SLICES;
+        DALI_LOG_WARNING( "Value for slices clamped.\n" );
       }
     }
     else
@@ -231,10 +233,12 @@ void PrimitiveVisual::DoInitialize( Actor& actor, const Property::Map& propertyM
       if( mStacks > MAX_PARTITIONS )
       {
         mStacks = MAX_PARTITIONS;
+        DALI_LOG_WARNING( "Value for stacks clamped.\n" );
       }
       else if ( mStacks < MIN_STACKS )
       {
         mStacks = MIN_STACKS;
+        DALI_LOG_WARNING( "Value for stacks clamped.\n" );
       }
     }
     else
@@ -276,14 +280,17 @@ void PrimitiveVisual::DoInitialize( Actor& actor, const Property::Map& propertyM
       if( mScaleDimensions.x <= 0.0 )
       {
         mScaleDimensions.x = 1.0;
+        DALI_LOG_WARNING( "Value for scale dimensions clamped. Must be greater than zero.\n" );
       }
       if( mScaleDimensions.y <= 0.0 )
       {
         mScaleDimensions.y = 1.0;
+        DALI_LOG_WARNING( "Value for scale dimensions clamped. Must be greater than zero.\n" );
       }
       if( mScaleDimensions.z <= 0.0 )
       {
         mScaleDimensions.z = 1.0;
+        DALI_LOG_WARNING( "Value for scale dimensions clamped. Must be greater than zero.\n" );
       }
     }
     else
@@ -301,10 +308,12 @@ void PrimitiveVisual::DoInitialize( Actor& actor, const Property::Map& propertyM
       if( mBevelPercentage < MIN_BEVEL_PERCENTAGE )
       {
         mBevelPercentage = MIN_BEVEL_PERCENTAGE;
+        DALI_LOG_WARNING( "Value for bevel percentage clamped.\n" );
       }
       else if( mBevelPercentage > MAX_BEVEL_PERCENTAGE )
       {
         mBevelPercentage = MAX_BEVEL_PERCENTAGE;
+        DALI_LOG_WARNING( "Value for bevel percentage clamped.\n" );
       }
     }
     else
@@ -322,10 +331,12 @@ void PrimitiveVisual::DoInitialize( Actor& actor, const Property::Map& propertyM
       if( mBevelSmoothness < MIN_SMOOTHNESS )
       {
         mBevelSmoothness = MIN_SMOOTHNESS;
+        DALI_LOG_WARNING( "Value for bevel smoothness clamped.\n" );
       }
       else if( mBevelSmoothness > MAX_SMOOTHNESS )
       {
         mBevelSmoothness = MAX_SMOOTHNESS;
+        DALI_LOG_WARNING( "Value for bevel smoothness clamped.\n" );
       }
     }
     else
@@ -377,7 +388,7 @@ void PrimitiveVisual::DoCreatePropertyMap( Property::Map& map ) const
   map.Clear();
   map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::PRIMITIVE );
   map.Insert( Toolkit::PrimitiveVisual::Property::SHAPE, mPrimitiveType );
-  map.Insert( Toolkit::PrimitiveVisual::Property::COLOR, mColor );
+  map.Insert( Toolkit::PrimitiveVisual::Property::MIX_COLOR, mColor );
   map.Insert( Toolkit::PrimitiveVisual::Property::SLICES, mSlices );
   map.Insert( Toolkit::PrimitiveVisual::Property::STACKS, mStacks );
   map.Insert( Toolkit::PrimitiveVisual::Property::SCALE_TOP_RADIUS, mScaleTopRadius );
@@ -419,7 +430,7 @@ void PrimitiveVisual::UpdateShaderUniforms()
   mShader.RegisterProperty( STAGE_OFFSET_UNIFORM_NAME, Vector2( width, height ) / 2.0f );
   mShader.RegisterProperty( LIGHT_POSITION_UNIFORM_NAME, mLightPosition );
   mShader.RegisterProperty( OBJECT_MATRIX_UNIFORM_NAME, scaleMatrix );
-  mShader.RegisterProperty( Toolkit::PrimitiveVisual::Property::COLOR, COLOR_UNIFORM_NAME, mColor );
+  mShader.RegisterProperty( Toolkit::PrimitiveVisual::Property::MIX_COLOR, COLOR_UNIFORM_NAME, mColor );
   mShader.RegisterProperty( OBJECT_DIMENSIONS_UNIFORM_NAME, mObjectDimensions );
 }
 
@@ -1129,16 +1140,17 @@ void PrimitiveVisual::ComputeBevelledCubeVertices( Vector<Vertex>& vertices, Vec
   int normalIndex = 0;  //Track progress through normals, as vertices are calculated per face.
 
   float minDimension = std::min( std::min( dimensions.x, dimensions.y ), dimensions.z );
-  float bevelScale = 1.0 - bevelPercentage;
-  float bevelAmount = 0.5 * bevelScale * minDimension;
+  float bevelAmount = 0.5 * std::min( bevelPercentage, minDimension ); //Cap bevel amount if necessary.
 
+  //Distances from centre to outer edge points.
   float outerX = 0.5 * dimensions.x;
   float outerY = 0.5 * dimensions.y;
   float outerZ = 0.5 * dimensions.z;
 
-  float bevelX = outerX - ( 0.5 * minDimension - bevelAmount );
-  float bevelY = outerY - ( 0.5 * minDimension - bevelAmount );
-  float bevelZ = outerZ - ( 0.5 * minDimension - bevelAmount );
+  //Distances from centre to bevelled points.
+  float bevelX = outerX - bevelAmount;
+  float bevelY = outerY - bevelAmount;
+  float bevelZ = outerZ - bevelAmount;
 
   Vector<Vector3> positions;  //Holds object points, to be shared between vertexes.
   positions.Resize( numPositions );
index a5aac2d..5b04d4e 100644 (file)
@@ -46,12 +46,12 @@ enum
 
   /**
    * @brief The color of the shape.
-   * @details Name "shapeColor", type Property::VECTOR4.
-   * @SINCE_1_1.45
+   * @details Name "mixColor", type Property::VECTOR4.
+   * @SINCE_1_2.4
    * @note Optional. If not specified, the default is Vector4(0.5, 0.5, 0.5, 1.0).
    * @note Applies to ALL shapes.
    */
-  COLOR,
+  MIX_COLOR,
 
   /**
    * @brief The number of slices as you go around the shape.
index a6ded0d..8f472d8 100644 (file)
@@ -28,7 +28,7 @@
 {
   "styles":
   {
-    "textlabel":
+    "TextLabel":
     {
       "pointSize":108,
       "enableAutoScroll":false,
       "autoScrollSpeed":80
     },
 
-    "textlabelFontSize0":
+    "TextLabelFontSize0":
     {
       "pointSize":84
     },
-    "textlabelFontSize1":
+    "TextLabelFontSize1":
     {
       "pointSize":96
     },
-    "textlabelFontSize2":
+    "TextLabelFontSize2":
     {
       "pointSize":108
     },
-    "textlabelFontSize3":
+    "TextLabelFontSize3":
     {
       "pointSize":120
     },
-    "textlabelFontSize4":
+    "TextLabelFontSize4":
     {
       "pointSize":132
     },
 
-    "textfield":
+    "TextField":
     {
       "pointSize":120,
       "primaryCursorColor":[0.0,0.72,0.9,1.0],
       "selectionHandleImageRight": {"filename":"{DALI_STYLE_IMAGE_DIR}selection_handle_drop_right.png" }
     },
 
-    "textfieldFontSize0":
+    "TextFieldFontSize0":
     {
       "pointSize":120
     },
-    "textfieldFontSize1":
+    "TextFieldFontSize1":
     {
       "pointSize":120
     },
-    "textfieldFontSize2":
+    "TextFieldFontSize2":
     {
       "pointSize":120
     },
-    "textfieldFontSize3":
+    "TextFieldFontSize3":
     {
       "pointSize":120
     },
-    "textfieldFontSize4":
+    "TextFieldFontSize4":
     {
       "pointSize":120
     },
-    "textselectionpopup":
+    "TextSelectionPopup":
     {
       "popupMaxSize":[1700,100],
       "optionDividerSize":[2,0],
       "popupFadeInDuration":0.25,
       "popupFadeOutDuration":0.25
     },
-    "textselectionpopupbutton":
+    "TextSelectionPopupButton":
     {
       "label":
       {
         "fontStyle":"{\"weight\":\"light\"}"
       }
     },
-    "textselectiontoolbar":
+    "TextSelectionToolbar":
     {
       "enableOvershoot":true,
       "scrollView":
         "overshootSize":[1920.0,130.0]
       }
     },
-    "scrollview":
+    "ScrollView":
     {
       "overshootEffectColor":"B018",
       "overshootAnimationSpeed":960.0,
       "overshootSize":[1920.0,130.0]
     },
-    "itemview":
+    "ItemView":
     {
       "overshootEffectColor":"B018",
       "overshootAnimationSpeed":960.0,
       "overshootSize":[1920.0,130.0]
     },
-    "texteditor":
+    "TextEditor":
     {
       "pointSize":120,
       "primaryCursorColor":[0.0,0.72,0.9,1.0],
index fd8e1a4..6d9eb61 100644 (file)
@@ -28,7 +28,7 @@
 {
   "styles":
   {
-    "textlabel":
+    "TextLabel":
     {
       "pointSize":18,
       "enableAutoScroll":false,
       "autoScrollSpeed":80
     },
 
-    "textlabelFontSize0":
+    "TextLabelFontSize0":
     {
       "pointSize":8
     },
-    "textlabelFontSize1":
+    "TextLabelFontSize1":
     {
       "pointSize":10
     },
-    "textlabelFontSize2":
+    "TextLabelFontSize2":
     {
       "pointSize":15
     },
-    "textlabelFontSize3":
+    "TextLabelFontSize3":
     {
       "pointSize":19
     },
-    "textlabelFontSize4":
+    "TextLabelFontSize4":
     {
       "pointSize":25
     },
-    "radiobutton":
+    "RadioButton":
     {
       "unselectedStateImage":"{DALI_IMAGE_DIR}radio-button-unselected.png",
       "selectedStateImage":"{DALI_IMAGE_DIR}radio-button-selected.png",
@@ -65,7 +65,7 @@
       "disabledSelectedStateImage":"{DALI_IMAGE_DIR}radio-button-selected-disabled.png"
     },
 
-    "textfield":
+    "TextField":
     {
       "pointSize":18,
       "primaryCursorColor":[0.0,0.72,0.9,1.0],
       "selectionHandleImageRight": {"filename":"{DALI_STYLE_IMAGE_DIR}selection_handle_drop_right.png" }
     },
 
-    "textfieldFontSize0":
+    "TextFieldFontSize0":
     {
       "pointSize":10
     },
-    "textfieldFontSize1":
+    "TextFieldFontSize1":
     {
       "pointSize":10
     },
-    "textfieldFontSize2":
+    "TextFieldFontSize2":
     {
       "pointSize":10
     },
-    "textfieldFontSize3":
+    "TextFieldFontSize3":
     {
       "pointSize":10
     },
-    "textfieldFontSize4":
+    "TextFieldFontSize4":
     {
       "pointSize":10
     },
-    "textselectionpopup":
+    "TextSelectionPopup":
     {
       "popupMaxSize":[400,100],
       "optionDividerSize":[2,0],
       "popupFadeInDuration":0.25,
       "popupFadeOutDuration":0.25
     },
-    "textselectionpopupbutton":
+    "TextSelectionPopupButton":
     {
       "label":
       {
         "fontStyle":"{\"weight\":\"light\"}"
       }
     },
-    "textselectiontoolbar":
+    "TextSelectionToolbar":
     {
       "enableOvershoot":true,
       "scrollView":
         "overshootSize":[480.0,42.0]
       }
     },
-    "scrollview":
+    "ScrollView":
     {
       "overshootEffectColor":"B018",
       "overshootAnimationSpeed":120.0,
       "overshootSize":[480.0,42.0]
     },
-    "itemview":
+    "ItemView":
     {
       "overshootEffectColor":"B018",
       "overshootAnimationSpeed":120.0,
       "overshootSize":[480.0,42.0]
     },
-    "texteditor":
+    "TextEditor":
     {
       "pointSize":18,
       "primaryCursorColor":[0.0,0.72,0.9,1.0],
       "selectionHandleImageLeft" : {"filename":"{DALI_STYLE_IMAGE_DIR}selection_handle_drop_left.png" },
       "selectionHandleImageRight": {"filename":"{DALI_STYLE_IMAGE_DIR}selection_handle_drop_right.png" }
     },
-    "popup":
+    "Popup":
     {
       "popupBackgroundImage":"{DALI_IMAGE_DIR}00_popup_bg.9.png"
     },
-    "confirmationpopup":
+    "ConfirmationPopup":
     {
       "popupBackgroundImage":"{DALI_IMAGE_DIR}00_popup_bg.9.png"
     },
-    "slider":
+    "Slider":
     {
       "showPopup": true,
       "showValue": true,
index 0a6f61f..25b2375 100644 (file)
@@ -28,7 +28,7 @@
 {
   "styles":
   {
-    "textlabel":
+    "TextLabel":
     {
       "pointSize":18,
       "enableAutoScroll":false,
       "autoScrollSpeed":80
     },
 
-    "textlabelFontSize0":
+    "TextLabelFontSize0":
     {
       "pointSize":8
     },
-    "textlabelFontSize1":
+    "TextLabelFontSize1":
     {
       "pointSize":10
     },
-    "textlabelFontSize2":
+    "TextLabelFontSize2":
     {
       "pointSize":15
     },
-    "textlabelFontSize3":
+    "TextLabelFontSize3":
     {
       "pointSize":19
     },
-    "textlabelFontSize4":
+    "TextLabelFontSize4":
     {
       "pointSize":25
     },
-    "radiobutton":
+    "RadioButton":
     {
       "unselectedStateImage":"{DALI_IMAGE_DIR}radio-button-unselected.png",
       "selectedStateImage":"{DALI_IMAGE_DIR}radio-button-selected.png",
@@ -65,7 +65,7 @@
       "disabledSelectedStateImage":"{DALI_IMAGE_DIR}radio-button-selected-disabled.png"
     },
 
-    "textfield":
+    "TextField":
     {
       "pointSize":18,
       "primaryCursorColor":[0.0,0.72,0.9,1.0],
       "selectionHandleImageRight": {"filename":"{DALI_STYLE_IMAGE_DIR}selection_handle_drop_right.png" }
     },
 
-    "textfieldFontSize0":
+    "TextFieldFontSize0":
     {
       "pointSize":10
     },
-    "textfieldFontSize1":
+    "TextFieldFontSize1":
     {
       "pointSize":10
     },
-    "textfieldFontSize2":
+    "TextFieldFontSize2":
     {
       "pointSize":10
     },
-    "textfieldFontSize3":
+    "TextFieldFontSize3":
     {
       "pointSize":10
     },
-    "textfieldFontSize4":
+    "TextFieldFontSize4":
     {
       "pointSize":10
     },
-    "textselectionpopup":
+    "TextSelectionPopup":
     {
       "popupMaxSize":[656,72],
       "optionDividerSize":[2,0],
       "popupFadeInDuration":0.25,
       "popupFadeOutDuration":0.25
     },
-    "textselectionpopupbutton":
+    "TextSelectionPopupButton":
     {
       "label":
       {
         "fontStyle":"{\"weight\":\"light\"}"
       }
     },
-    "textselectiontoolbar":
+    "TextSelectionToolbar":
     {
       "enableOvershoot":true,
       "scrollView":
         "overshootSize":[720.0,130.0]
       }
     },
-    "scrollview":
+    "ScrollView":
     {
       "overshootEffectColor":"B018",
       "overshootAnimationSpeed":360.0,
       "overshootSize":[720.0,130.0]
     },
-    "itemview":
+    "ItemView":
     {
       "overshootEffectColor":"B018",
       "overshootAnimationSpeed":360.0,
       "overshootSize":[720.0,130.0]
     },
-    "texteditor":
+    "TextEditor":
     {
       "pointSize":18,
       "primaryCursorColor":[0.0,0.72,0.9,1.0],
       "selectionHandleImageLeft" : {"filename":"{DALI_STYLE_IMAGE_DIR}selection_handle_drop_left.png" },
       "selectionHandleImageRight": {"filename":"{DALI_STYLE_IMAGE_DIR}selection_handle_drop_right.png" }
     },
-    "popup":
+    "Popup":
     {
       "popupBackgroundImage":"{DALI_IMAGE_DIR}00_popup_bg.9.png"
     },
-    "confirmationpopup":
+    "ConfirmationPopup":
     {
       "popupBackgroundImage":"{DALI_IMAGE_DIR}00_popup_bg.9.png"
     },
-    "slider":
+    "Slider":
     {
       "showPopup": true,
       "showValue": true,
index 728f080..3ae2c31 100644 (file)
@@ -496,7 +496,7 @@ The shapes are generated with clockwise winding and back-face culling on by defa
 | Property                                                      | String            | Type               | Description                                                                                                     | Default Value                                           | Range                          |
 |---------------------------------------------------------------|-------------------|:------------------:|-----------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------:|:------------------------------:|
 | Dali::Toolkit::PrimitiveVisual::Property::SHAPE               | shape             | INTEGER or STRING  | The specific shape to render. [More info](@ref shape-details)                                                   | Dali::Toolkit::PrimitiveVisual::Shape::SPHERE, "SPHERE" | [See list](@ref shape-details) |
-| Dali::Toolkit::PrimitiveVisual::Property::COLOR               | shapeColor        | VECTOR4            | The color of the shape.                                                                                         | (0.5, 0.5, 0.5, 1.0)                                    | 0.0 - 1.0 for each             |
+| Dali::Toolkit::PrimitiveVisual::Property::MIX_COLOR           | mixColor          | VECTOR4            | The color of the shape.                                                                                         | (0.5, 0.5, 0.5, 1.0)                                    | 0.0 - 1.0 for each             |
 | Dali::Toolkit::PrimitiveVisual::Property::SLICES              | slices            | INTEGER            | The number of slices as you go around the shape. [More info](@ref slices-details)                               | 128                                                     | 1 - 255                        |
 | Dali::Toolkit::PrimitiveVisual::Property::STACKS              | stacks            | INTEGER            | The number of stacks as you go down the shape. [More info](@ref stacks-details)                                 | 128                                                     | 1 - 255                        |
 | Dali::Toolkit::PrimitiveVisual::Property::SCALE_TOP_RADIUS    | scaleTopRadius    | FLOAT              | The scale of the radius of the top circle of a conical frustrum.                                                | 1.0                                                     | ≥ 0.0                          |
@@ -569,7 +569,7 @@ Dali::Property::Map map;
 
 map[ Visual::Property::TYPE ] = Dali::Toolkit::Visual::PRIMITIVE;
 map[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::SPHERE;
-map[ PrimitiveVisual::Property::COLOR ] = Vector4( 1.0, 0.5, 0.0, 1.0 );
+map[ PrimitiveVisual::Property::MIX_COLOR ] = Vector4( 1.0, 0.5, 0.0, 1.0 );
 
 control.SetProperty( Control::Property::BACKGROUND, map );
 ~~~
@@ -584,7 +584,7 @@ Dali::Property::Map map;
 
 map[ Visual::Property::TYPE ] = Dali::Toolkit::Visual::PRIMITIVE;
 map[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::CONICAL_FRUSTRUM;
-map[ PrimitiveVisual::Property::COLOR ] = Vector4( 1.0, 0.5, 0.0, 1.0 );
+map[ PrimitiveVisual::Property::MIX_COLOR ] = Vector4( 1.0, 0.5, 0.0, 1.0 );
 map[ PrimitiveVisual::Property::SCALE_TOP_RADIUS ] = 1.0f;
 map[ PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS ] = 1.5f;
 map[ PrimitiveVisual::Property::SCALE_HEIGHT ] = 3.0f;
@@ -602,7 +602,7 @@ Dali::Property::Map map;
 
 map[ Visual::Property::TYPE ] = Dali::Toolkit::Visual::PRIMITIVE;
 map[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::BEVELLED_CUBE;
-map[ PrimitiveVisual::Property::COLOR ] = Vector4( 1.0, 0.5, 0.0, 1.0 );
+map[ PrimitiveVisual::Property::MIX_COLOR ] = Vector4( 1.0, 0.5, 0.0, 1.0 );
 map[ PrimitiveVisual::Property::BEVEL_PERCENTAGE ] = 0.4f;
 
 control.SetProperty( Control::Property::BACKGROUND, map );