aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-24 19:10:15 +0800
committercrupest <crupest@outlook.com>2020-06-24 19:10:15 +0800
commit01b97f7e819f88f01fa0b327dfa2c2aabfa81657 (patch)
tree101221b9e0589aa7f46a6d788c571cb59f24dced
parent4f0a2f32c273780c32cc3937615c2a8bbd993aab (diff)
downloadcru-01b97f7e819f88f01fa0b327dfa2c2aabfa81657.tar.gz
cru-01b97f7e819f88f01fa0b327dfa2c2aabfa81657.tar.bz2
cru-01b97f7e819f88f01fa0b327dfa2c2aabfa81657.zip
...
-rw-r--r--src/ui/render/FlexLayoutRenderObject.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/render/FlexLayoutRenderObject.cpp b/src/ui/render/FlexLayoutRenderObject.cpp
index 079bc5a9..98eda066 100644
--- a/src/ui/render/FlexLayoutRenderObject.cpp
+++ b/src/ui/render/FlexLayoutRenderObject.cpp
@@ -69,14 +69,13 @@ Size FlexLayoutRenderObject::OnMeasureContent(
}
}
- for (const int i : expand_children) {
+ for (const Index i : expand_children) {
const float distributed_grow_length =
remain_main_length *
(GetChildLayoutData(i)->expand_factor / total_expand_factor);
const auto child = children[i];
const float new_main_length =
- get_main_length(child->GetMeasuredSize()) +
- distributed_grow_length;
+ get_main_length(child->GetMeasuredSize()) + distributed_grow_length;
child->Measure(create_requirement(new_main_length, cross_max_length));
}
} else if (remain_main_length < 0) {
@@ -91,7 +90,7 @@ Size FlexLayoutRenderObject::OnMeasureContent(
}
}
- for (const int i : shrink_children) {
+ for (const Index i : shrink_children) {
const float distributed_shrink_length = // negative
remain_main_length *
(GetChildLayoutData(i)->shrink_factor / total_shrink_factor);