fix(dnd_destination): layout for dnd rectangle children
This commit is contained in:
parent
fa26e0e241
commit
dd3610b8ae
1 changed files with 6 additions and 8 deletions
|
|
@ -597,14 +597,12 @@ impl<Message: 'static> Widget<Message, crate::Theme, crate::Renderer>
|
|||
};
|
||||
dnd_rectangles.push(my_dest);
|
||||
|
||||
if let Some(child_layout) = layout.children().next() {
|
||||
self.container.as_widget().drag_destinations(
|
||||
&state.children[0],
|
||||
child_layout.with_virtual_offset(layout.virtual_offset()),
|
||||
renderer,
|
||||
dnd_rectangles,
|
||||
);
|
||||
}
|
||||
self.container.as_widget().drag_destinations(
|
||||
&state.children[0],
|
||||
layout,
|
||||
renderer,
|
||||
dnd_rectangles,
|
||||
);
|
||||
}
|
||||
|
||||
fn id(&self) -> Option<Id> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue