feat: add drag_destinations for container widgets
This commit is contained in:
parent
b9cc88c492
commit
745cba1c2c
5 changed files with 72 additions and 1 deletions
|
|
@ -198,6 +198,23 @@ impl<'a, Message: 'static + Clone> Widget<Message, crate::Theme, Renderer>
|
|||
.map(|((c, c_layout), state)| c.as_widget().a11y_nodes(c_layout, state, p)),
|
||||
)
|
||||
}
|
||||
|
||||
fn drag_destinations(
|
||||
&self,
|
||||
state: &Tree,
|
||||
layout: Layout<'_>,
|
||||
dnd_rectangles: &mut iced_style::core::clipboard::DndDestinationRectangles,
|
||||
) {
|
||||
for ((e, layout), state) in self
|
||||
.children
|
||||
.iter()
|
||||
.zip(layout.children())
|
||||
.zip(state.children.iter())
|
||||
{
|
||||
e.as_widget()
|
||||
.drag_destinations(state, layout, dnd_rectangles);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, Message: 'static + Clone> From<FlexRow<'a, Message>> for Element<'a, Message> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue