Performance: text_svg still isn't that great neither is video DnD: The cosmic DND solution still doesn't work consistently, so I will likely code my own trick.
This commit is contained in:
parent
79eff08add
commit
0c51e7a724
7 changed files with 136 additions and 20 deletions
15
src/main.rs
15
src/main.rs
|
@ -312,6 +312,21 @@ impl cosmic::Application for App {
|
|||
} else {
|
||||
cosmic::Action::None
|
||||
}
|
||||
}).on_drop(|index, idk| {
|
||||
debug!(index, idk);
|
||||
cosmic::Action::None
|
||||
}).on_data_received( move |mime, data| {
|
||||
debug!(?data, mime);
|
||||
let Ok(item) = ServiceItem::try_from((data.clone(), mime.clone())) else {
|
||||
return cosmic::Action::None;
|
||||
};
|
||||
cosmic::Action::App(Message::AddServiceItem(index, item))
|
||||
}).on_finish(move |mime, data, action, x, y| {
|
||||
debug!(mime, ?data, ?action, x, y);
|
||||
let Ok(item) = ServiceItem::try_from((data.clone(), mime.clone())) else {
|
||||
return cosmic::Action::None;
|
||||
};
|
||||
cosmic::Action::App(Message::AddServiceItem(index, item))
|
||||
})
|
||||
.into()
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue