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},
|
||||
clipboard::dnd::DndAction,
|
||||
event,
|
||||
futures,
|
||||
futures::SinkExt,
|
||||
futures::{self, SinkExt},
|
||||
keyboard::Modifiers,
|
||||
stream,
|
||||
//TODO: export in cosmic::widget
|
||||
|
|
@ -26,6 +25,7 @@ use cosmic::{
|
|||
Rectangle,
|
||||
Size,
|
||||
Subscription,
|
||||
Vector,
|
||||
},
|
||||
iced_core::{mouse::ScrollDelta, widget::tree},
|
||||
theme,
|
||||
|
|
@ -5402,9 +5402,13 @@ impl Tab {
|
|||
.drag_content(move || {
|
||||
ClipboardCopy::new(crate::clipboard::ClipboardKind::Copy, &files)
|
||||
})
|
||||
.drag_icon(move |v| {
|
||||
.drag_icon(move |_| {
|
||||
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue