add file property to drag data

This commit is contained in:
Evan Almloff committed 2023-04-27 10:21:05 -05:00
1 parent c904411190
commit ada246c12e
11 files changed
+133 -77

No files matched your search

+4 -6
View File
@@ -49,14 +49,12 @@ pub fn build(
.with_custom_protocol(String::from("dioxus"), move |r| {
protocol::desktop_handler(r, custom_head.clone(), index_file.clone(), &root_name)
})
.with_file_drop_handler(move |window, evet| {
file_handler
.as_ref()
.map(|handler| handler(window, evet))
.unwrap_or_default()
})
.with_web_context(&mut web_context);
if let Some(handler) = file_handler {
webview = webview.with_file_drop_handler(handler)
}
#[cfg(windows)]
{
// Windows has a platform specific settings to disable the browser shortcut keys