fix: more drag destinations
This commit is contained in:
parent
86f985086f
commit
73369a18eb
3 changed files with 35 additions and 1 deletions
|
|
@ -248,6 +248,23 @@ where
|
|||
.overlay(state, layout, renderer, viewport, offset)
|
||||
}
|
||||
}
|
||||
|
||||
fn drag_destinations(
|
||||
&self,
|
||||
state: &widget::Tree,
|
||||
layout: Layout<'_>,
|
||||
renderer: &Renderer,
|
||||
dnd_rectangles: &mut crate::core::clipboard::DndDestinationRectangles,
|
||||
) {
|
||||
if let Some(l) = layout.children().next() {
|
||||
self.content.as_widget().drag_destinations(
|
||||
state,
|
||||
l.with_virtual_offset(layout.virtual_offset()),
|
||||
renderer,
|
||||
dnd_rectangles,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, Message, Theme, Renderer> From<Float<'a, Message, Theme, Renderer>>
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ where
|
|||
) {
|
||||
if let Some(l) = layout.children().next() {
|
||||
self.content.as_widget().drag_destinations(
|
||||
state,
|
||||
&state.children[0],
|
||||
l.with_virtual_offset(layout.virtual_offset()),
|
||||
renderer,
|
||||
dnd_rectangles,
|
||||
|
|
|
|||
|
|
@ -281,6 +281,23 @@ where
|
|||
})
|
||||
.map(|overlay| overlay::Element::new(Box::new(overlay)))
|
||||
}
|
||||
|
||||
fn drag_destinations(
|
||||
&self,
|
||||
state: &Tree,
|
||||
layout: Layout<'_>,
|
||||
renderer: &Renderer,
|
||||
dnd_rectangles: &mut crate::core::clipboard::DndDestinationRectangles,
|
||||
) {
|
||||
if let Some(l) = layout.children().next() {
|
||||
self.content.as_widget().drag_destinations(
|
||||
state,
|
||||
l.with_virtual_offset(layout.virtual_offset()),
|
||||
renderer,
|
||||
dnd_rectangles,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, Message, Theme, Renderer, AnyTheme>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue