Skip to content

Commit

Permalink
Use child layout
Browse files Browse the repository at this point in the history
  • Loading branch information
tarkah committed Oct 19, 2022
1 parent 470723c commit 069371c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions native/src/widget/pane_grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ pub fn draw<Renderer, T>(
for ((id, pane), layout) in elements.zip(layout.children()) {
match picked_pane {
Some((dragging, origin)) if id == dragging => {
render_picked_pane = Some((pane, origin, layout.bounds()));
render_picked_pane = Some((pane, origin, layout));
}
_ => {
draw_pane(
Expand All @@ -778,7 +778,9 @@ pub fn draw<Renderer, T>(
}

// Render picked pane last
if let Some((pane, origin, bounds)) = render_picked_pane {
if let Some((pane, origin, layout)) = render_picked_pane {
let bounds = layout.bounds();

renderer.with_translation(
cursor_position
- Point::new(bounds.x + origin.x, bounds.y + origin.y),
Expand Down

0 comments on commit 069371c

Please sign in to comment.