fix(dnd): use zero offset for dnd icons
This commit is contained in:
parent
19c2cefd8a
commit
319fa5faec
1 changed files with 8 additions and 4 deletions
12
src/tab.rs
12
src/tab.rs
|
|
@ -8,8 +8,7 @@ use cosmic::{
|
||||||
alignment::{Horizontal, Vertical},
|
alignment::{Horizontal, Vertical},
|
||||||
clipboard::dnd::DndAction,
|
clipboard::dnd::DndAction,
|
||||||
event,
|
event,
|
||||||
futures,
|
futures::{self, SinkExt},
|
||||||
futures::SinkExt,
|
|
||||||
keyboard::Modifiers,
|
keyboard::Modifiers,
|
||||||
stream,
|
stream,
|
||||||
//TODO: export in cosmic::widget
|
//TODO: export in cosmic::widget
|
||||||
|
|
@ -26,6 +25,7 @@ use cosmic::{
|
||||||
Rectangle,
|
Rectangle,
|
||||||
Size,
|
Size,
|
||||||
Subscription,
|
Subscription,
|
||||||
|
Vector,
|
||||||
},
|
},
|
||||||
iced_core::{mouse::ScrollDelta, widget::tree},
|
iced_core::{mouse::ScrollDelta, widget::tree},
|
||||||
theme,
|
theme,
|
||||||
|
|
@ -5402,9 +5402,13 @@ impl Tab {
|
||||||
.drag_content(move || {
|
.drag_content(move || {
|
||||||
ClipboardCopy::new(crate::clipboard::ClipboardKind::Copy, &files)
|
ClipboardCopy::new(crate::clipboard::ClipboardKind::Copy, &files)
|
||||||
})
|
})
|
||||||
.drag_icon(move |v| {
|
.drag_icon(move |_| {
|
||||||
let state: tree::State = Widget::<Message, _, _>::state(&drag_list);
|
let state: tree::State = Widget::<Message, _, _>::state(&drag_list);
|
||||||
(Element::from(drag_list.clone()).map(|_m| ()), state, v)
|
(
|
||||||
|
Element::from(drag_list.clone()).map(|_m| ()),
|
||||||
|
state,
|
||||||
|
Vector::ZERO,
|
||||||
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
_ => item_view,
|
_ => item_view,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue