From fc6b46342b365ca4f120a830b66204c2517945c8 Mon Sep 17 00:00:00 2001 From: Hojjat Date: Fri, 10 Apr 2026 09:55:37 -0600 Subject: [PATCH] feat: dnd destination for stack widget --- widget/src/stack.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/widget/src/stack.rs b/widget/src/stack.rs index 28da011e..e85bf2af 100644 --- a/widget/src/stack.rs +++ b/widget/src/stack.rs @@ -375,6 +375,28 @@ where } } + fn drag_destinations( + &self, + state: &Tree, + layout: Layout<'_>, + renderer: &Renderer, + dnd_rectangles: &mut crate::core::clipboard::DndDestinationRectangles, + ) { + for ((e, c_layout), state) in self + .children + .iter() + .zip(layout.children()) + .zip(state.children.iter()) + { + e.as_widget().drag_destinations( + state, + c_layout.with_virtual_offset(layout.virtual_offset()), + renderer, + dnd_rectangles, + ); + } + } + fn overlay<'b>( &'b mut self, tree: &'b mut Tree,