fix: Row now restores previous X position
This patch fixes a bug that's extremely similar to the bug fixed by the commit before this.
This commit is contained in:
parent
88f518f7c1
commit
b3aab25989
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue