fix(flex-row): awkward breakpoint after first row

This commit is contained in:
Michael Aaron Murphy 2023-12-13 23:38:38 +01:00 committed by Michael Murphy
parent 8725497827
commit d53f693a37

View file

@ -34,7 +34,7 @@ pub fn resolve<Message>(
let size = child_node.size();
// Calculate the required additional width to fit the item into the current row.
let required_width = size.width
let mut required_width = size.width
+ if row_buffer.is_empty() {
0.0
} else {
@ -58,7 +58,7 @@ pub fn resolve<Message>(
flex_height += current_row_height;
flex_width = flex_width.max(current_row_width);
required_width -= row_spacing;
current_row_width = 0.0;
}