diff --git a/src/widget/flex_row/layout.rs b/src/widget/flex_row/layout.rs index bcd9e4a..108c6c1 100644 --- a/src/widget/flex_row/layout.rs +++ b/src/widget/flex_row/layout.rs @@ -34,7 +34,7 @@ pub fn resolve( 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( flex_height += current_row_height; flex_width = flex_width.max(current_row_width); - + required_width -= row_spacing; current_row_width = 0.0; }