[YogaKit] support macOS, tvOS, Carthage; auto apply layout like AutoLayout. #1026
@@ -149,11 +149,11 @@
|
|||||||
lowercased_name, capitalized_name, capitalized_name, YGEdgeAll)
|
lowercased_name, capitalized_name, capitalized_name, YGEdgeAll)
|
||||||
|
|
||||||
YGValue YGPointValue(CGFloat value) {
|
YGValue YGPointValue(CGFloat value) {
|
||||||
return (YGValue){.value = value, .unit = YGUnitPoint};
|
return (YGValue){.value = (float)value, .unit = YGUnitPoint};
|
||||||
}
|
}
|
||||||
|
|
||||||
YGValue YGPercentValue(CGFloat value) {
|
YGValue YGPercentValue(CGFloat value) {
|
||||||
return (YGValue){.value = value, .unit = YGUnitPercent};
|
return (YGValue){.value = (float)value, .unit = YGUnitPercent};
|
||||||
}
|
}
|
||||||
|
|
||||||
static CGFloat YGScaleFactor() {
|
static CGFloat YGScaleFactor() {
|
||||||
@@ -407,9 +407,9 @@ static YGSize YGMeasureView(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (YGSize){
|
return (YGSize){
|
||||||
.width = YGSanitizeMeasurement(
|
.width = (float)YGSanitizeMeasurement(
|
||||||
constrainedWidth, sizeThatFits.width, widthMode),
|
constrainedWidth, sizeThatFits.width, widthMode),
|
||||||
.height = YGSanitizeMeasurement(
|
.height = (float)YGSanitizeMeasurement(
|
||||||
constrainedHeight, sizeThatFits.height, heightMode),
|
constrainedHeight, sizeThatFits.height, heightMode),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user