Add feature to use percentage as value unit #258

Closed
woehrl01 wants to merge 43 commits from percentage-feature into master
74 changed files with 5203 additions and 3112 deletions
Showing only changes of commit 34c97b03f6 - Show all commits

View File

@@ -417,16 +417,6 @@ inline float YGNodeStyleGetFlexShrink(const YGNodeRef node) {
return 0.0f;
}
inline YGValue YGNodeStyleGetFlexBasis(const YGNodeRef node) {
if (node->style.flexBasis.isDefined) {
return node->style.flexBasis;
}
if (!YGFloatIsUndefined(node->style.flex) && node->style.flex > 0.0f) {
return YGValueZero;
}
return YGValueUndefined;
}
static inline const YGValue * YGNodeStyleGetFlexBasisPtr(const YGNodeRef node) {
if (node->style.flexBasis.isDefined) {
return &node->style.flexBasis;
@@ -437,6 +427,10 @@ static inline const YGValue * YGNodeStyleGetFlexBasisPtr(const YGNodeRef node) {
return &YGValueUndefined;
}
inline YGValue YGNodeStyleGetFlexBasis(const YGNodeRef node) {
return *YGNodeStyleGetFlexBasisPtr(node);
}
void YGNodeStyleSetFlex(const YGNodeRef node, const float flex) {
if (node->style.flex != flex) {
node->style.flex = flex;