Baseline support #317

Closed
woehrl01 wants to merge 33 commits from baseline-support into master
20 changed files with 4602 additions and 7 deletions
Showing only changes of commit 9e44f0f4d4 - Show all commits

View File

@@ -1025,6 +1025,7 @@ static bool YGIsBaselineLayout(const YGNodeRef node) {
return true; return true;
} }
} }
return false; return false;
} }
@@ -2575,9 +2576,9 @@ static void YGNodelayoutImpl(const YGNodeRef node,
break; break;
} }
case YGAlignBaseline: { case YGAlignBaseline: {
child->layout.position[pos[crossAxis]] = child->layout.position[YGEdgeTop] =
currentLead + maxAscentForCurrentLine - YGBaseline(child) + currentLead + maxAscentForCurrentLine - YGBaseline(child) +
YGNodeLeadingPosition(child, crossAxis, availableInnerCrossDim); YGNodeLeadingPosition(child, YGFlexDirectionColumn, availableInnerCrossDim);
break; break;
} }
case YGAlignAuto: case YGAlignAuto:

View File

@@ -50,7 +50,6 @@ typedef YGSize (*YGMeasureFunc)(YGNodeRef node,
float height, float height,
YGMeasureMode heightMode); YGMeasureMode heightMode);
typedef float (*YGBaselineFunc)(YGNodeRef node); typedef float (*YGBaselineFunc)(YGNodeRef node);
typedef void (*YGPrintFunc)(YGNodeRef node); typedef void (*YGPrintFunc)(YGNodeRef node);
typedef int (*YGLogger)(YGLogLevel level, const char *format, va_list args); typedef int (*YGLogger)(YGLogLevel level, const char *format, va_list args);