X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fflex-container%2Fflex-container-example.cpp;h=835176e45c6c64580fa9d3829a78856fdbdd5b0c;hb=adcab5efeeba15bb228127d793ff6eee0e007b36;hp=cd723510d25f64df4f3db7acf24cfc5fc39fdfe2;hpb=04c3f1cc6f1532ec4d41ea2cfdb35bb573e566fe;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/flex-container/flex-container-example.cpp b/examples/flex-container/flex-container-example.cpp index cd72351..835176e 100644 --- a/examples/flex-container/flex-container-example.cpp +++ b/examples/flex-container/flex-container-example.cpp @@ -20,7 +20,6 @@ #include #include -#include using namespace Dali; using namespace Dali::Toolkit; @@ -200,8 +199,8 @@ public: // Add a text label to the container for showing the recently updated flexbox property value mFlexPropertyLabel = TextLabel::New( FLEX_DIRECTION[mCurrentFlexDirection] ); - mFlexPropertyLabel.RegisterProperty("flexMargin", Vector4(10.0f, 10.0f, 10.0f, 10.0f), Property::READ_WRITE); - mFlexPropertyLabel.RegisterProperty("flex", 0.05f, Property::READ_WRITE); // 5 pecent of the container size in the main axis + mFlexPropertyLabel.SetProperty(FlexContainer::ChildProperty::FLEX_MARGIN, Vector4(10.0f, 10.0f, 10.0f, 10.0f)); + mFlexPropertyLabel.SetProperty(FlexContainer::ChildProperty::FLEX, 0.05f); // 5 pecent of the container size in the main axis mFlexPropertyLabel.SetProperty(TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER"); mFlexPropertyLabel.SetProperty(TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER"); mFlexContainer.Add( mFlexPropertyLabel ); @@ -211,9 +210,9 @@ public: mFlexItemContainer.SetParentOrigin(ParentOrigin::TOP_LEFT); mFlexItemContainer.SetAnchorPoint(AnchorPoint::TOP_LEFT); mFlexItemContainer.SetBackgroundColor( Color::YELLOW ); - mFlexItemContainer.RegisterProperty("flex", 0.95f, Property::READ_WRITE); // 95 pecent of the container size in the main axis mFlexItemContainer.SetProperty(FlexContainer::Property::FLEX_DIRECTION, mCurrentFlexDirection); mFlexItemContainer.SetProperty(FlexContainer::Property::FLEX_WRAP, mCurrentFlexWrap); + mFlexItemContainer.SetProperty(FlexContainer::ChildProperty::FLEX, 0.95f); // 95 pecent of the container size in the main axis mFlexContainer.Add(mFlexItemContainer); // Create flex items and add them to the container