From: Jaehyun Cho Date: Thu, 3 Jun 2021 06:05:10 +0000 (+0900) Subject: Add SpaceEvenly to flex justification X-Git-Tag: accepted/tizen/6.0/unified/20210629.212506^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=40dd9762b4291fe6cce3edfa26c97f695f0867b0;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Add SpaceEvenly to flex justification Flex justification uses Yoga Layout's justify-content. Up to now, SpaceEvenly of Yoga Layout's justify-content has not been added to flex justification. SpaceAround distributes the equal space to before, and after each item. Therefore, the space between adjacent items is twice bigger than the space between the beginning edge and the first item. To distribute the equal space to before, between, and after each item, SpaceEvenly is added to flex justification. Change-Id: Icb4e1f1aa74f52a5cfe8f1399e9f42457c8c081f --- diff --git a/dali-toolkit/devel-api/layouting/flex-node.h b/dali-toolkit/devel-api/layouting/flex-node.h index 5a73458..f9a164f 100644 --- a/dali-toolkit/devel-api/layouting/flex-node.h +++ b/dali-toolkit/devel-api/layouting/flex-node.h @@ -55,7 +55,8 @@ enum class Justification CENTER, ///< Items are positioned at the center of the container FLEX_END, ///< Items are positioned at the end of the container SPACE_BETWEEN, ///< Items are positioned with equal space between the items - SPACE_AROUND ///< Items are positioned with equal space before, between, and after the items + SPACE_AROUND, ///< Items are positioned with equal space before, and after the items + SPACE_EVENLY ///< Items are positioned with equal space before, between, and after the items }; /** diff --git a/dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp b/dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp index 0fc7588..76b8a59 100755 --- a/dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp +++ b/dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp @@ -135,7 +135,8 @@ const Scripting::StringEnum JUSTIFY_CONTENT_STRING_TABLE[] = { "center", Toolkit::FlexContainer::JUSTIFY_CENTER }, { "flexEnd", Toolkit::FlexContainer::JUSTIFY_FLEX_END }, { "spaceBetween", Toolkit::FlexContainer::JUSTIFY_SPACE_BETWEEN }, - { "spaceAround", Toolkit::FlexContainer::JUSTIFY_SPACE_AROUND } + { "spaceAround", Toolkit::FlexContainer::JUSTIFY_SPACE_AROUND }, + { "spaceEvenly", Toolkit::FlexContainer::JUSTIFY_SPACE_EVENLY } }; const unsigned int JUSTIFY_CONTENT_STRING_TABLE_COUNT = sizeof( JUSTIFY_CONTENT_STRING_TABLE ) / sizeof( JUSTIFY_CONTENT_STRING_TABLE[0] ); diff --git a/dali-toolkit/public-api/controls/flex-container/flex-container.h b/dali-toolkit/public-api/controls/flex-container/flex-container.h index 51e26f7..2caf244 100644 --- a/dali-toolkit/public-api/controls/flex-container/flex-container.h +++ b/dali-toolkit/public-api/controls/flex-container/flex-container.h @@ -138,7 +138,8 @@ public: JUSTIFY_CENTER, ///< Items are positioned at the center of the container @SINCE_1_1.35 JUSTIFY_FLEX_END, ///< Items are positioned at the end of the container @SINCE_1_1.35 JUSTIFY_SPACE_BETWEEN, ///< Items are positioned with equal space between the lines @SINCE_1_1.35 - JUSTIFY_SPACE_AROUND ///< Items are positioned with equal space before, between, and after the lines @SINCE_1_1.35 + JUSTIFY_SPACE_AROUND, ///< Items are positioned with equal space before, and after the lines @SINCE_1_1.35 + JUSTIFY_SPACE_EVENLY ///< Items are positioned with equal space before, between, and after the lines @SINCE_1_9.37 }; /** diff --git a/docs/content/programming-guide/flex-container.md b/docs/content/programming-guide/flex-container.md index 4552527..df6b9e4 100644 --- a/docs/content/programming-guide/flex-container.md +++ b/docs/content/programming-guide/flex-container.md @@ -115,7 +115,8 @@ The possible values for this property are: | JUSTIFY_CENTER | Items are positioned at the center of the container | | JUSTIFY_FLEX_END | Items are positioned at the end of the container | | JUSTIFY_SPACE_BETWEEN | Items are positioned with equal space between the lines | -| JUSTIFY_SPACE_AROUND | Items are positioned with equal space before, between, and after the lines | +| JUSTIFY_SPACE_AROUND | Items are positioned with equal space before, and after the lines | +| JUSTIFY_SPACE_EVENLY | Items are positioned with equal space before, between, and after the lines | ### Usage