diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-12-14 20:46:18 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-12-14 20:46:18 +0800 |
| commit | 3b6a59e7f163b2d2f8a07ae187b392f71b074cc4 (patch) | |
| tree | b9d3063c35a46148e1bb3c5d4a68d99c705d747b /src/ui/render/FlexLayoutRenderObject.cpp | |
| parent | abc02cfae45c86519a795da6d14d8c85d57ae6f5 (diff) | |
| download | cru-3b6a59e7f163b2d2f8a07ae187b392f71b074cc4.tar.gz cru-3b6a59e7f163b2d2f8a07ae187b392f71b074cc4.tar.bz2 cru-3b6a59e7f163b2d2f8a07ae187b392f71b074cc4.zip | |
Use infinite size for 0 size window.
Diffstat (limited to 'src/ui/render/FlexLayoutRenderObject.cpp')
| -rw-r--r-- | src/ui/render/FlexLayoutRenderObject.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ui/render/FlexLayoutRenderObject.cpp b/src/ui/render/FlexLayoutRenderObject.cpp index f4936f15..c85748b8 100644 --- a/src/ui/render/FlexLayoutRenderObject.cpp +++ b/src/ui/render/FlexLayoutRenderObject.cpp @@ -85,6 +85,7 @@ template <typename direction_tag_t, std::is_same_v<direction_tag_t, tag_horizontal_t> || std::is_same_v<direction_tag_t, tag_vertical_t>>> Size FlexLayoutMeasureContentImpl( + FlexLayoutRenderObject* render_object, const MeasureRequirement& requirement, const MeasureSize& preferred_size, const std::vector<RenderObject*>& children, const std::vector<FlexChildLayoutData>& layout_data, @@ -300,9 +301,10 @@ Size FlexLayoutMeasureContentImpl( if (max_main_length.IsSpecified() && total_length > max_main_length.GetLengthOrUndefined()) { CruLogWarn(kLogTag, - "(Measure) Children's main axis length {} exceeds required max " + "{} Children's main axis length {} exceeds required max " "length {}.", - total_length, max_main_length.GetLengthOrUndefined()); + render_object->GetDebugPathInTree(), total_length, + max_main_length.GetLengthOrUndefined()); total_length = max_main_length.GetLengthOrUndefined(); } else if (min_main_length.IsSpecified() && total_length < min_main_length.GetLengthOrUndefined()) { @@ -344,11 +346,11 @@ Size FlexLayoutRenderObject::OnMeasureContent( if (horizontal) { return FlexLayoutMeasureContentImpl<tag_horizontal_t>( - requirement, requirement.suggest, children, layout_data_list, + this, requirement, requirement.suggest, children, layout_data_list, item_cross_align_, kLogTag); } else { return FlexLayoutMeasureContentImpl<tag_vertical_t>( - requirement, requirement.suggest, children, layout_data_list, + this, requirement, requirement.suggest, children, layout_data_list, item_cross_align_, kLogTag); } } |
