diff --git a/src/widget/column.rs b/src/widget/column.rs index 5a22985..2029091 100755 --- a/src/widget/column.rs +++ b/src/widget/column.rs @@ -29,7 +29,7 @@ impl Widget for Column { ); }); - renderer.position_at(renderer.position().0, prev_y); + renderer.position_at(renderer.position().0, prev_y) } fn position(&self, renderer: &mut Renderer) -> Position { diff --git a/src/widget/row.rs b/src/widget/row.rs index 95473e5..a5dbc2f 100755 --- a/src/widget/row.rs +++ b/src/widget/row.rs @@ -15,6 +15,7 @@ pub struct Row { impl Widget for Row { fn draw(&self, renderer: &mut Renderer) { + let (prev_x, _) = renderer.position(); self.widgets.iter().for_each(|widget| { let pos = widget.position(renderer); renderer.position_at( @@ -27,6 +28,8 @@ impl Widget for Row { renderer.position().1 ); }); + + renderer.position_at(prev_x, renderer.position().1) } fn position(&self, renderer: &mut Renderer) -> Position {