mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 14:50:03 -04:00
Added mime field to DroppedFiles (#3273)
This commit is contained in:
@@ -460,9 +460,18 @@ impl WrapApp {
|
||||
} else {
|
||||
"???".to_owned()
|
||||
};
|
||||
if let Some(bytes) = &file.bytes {
|
||||
write!(info, " ({} bytes)", bytes.len()).ok();
|
||||
|
||||
let mut additional_info = vec![];
|
||||
if !file.mime.is_empty() {
|
||||
additional_info.push(format!("type: {}", file.mime));
|
||||
}
|
||||
if let Some(bytes) = &file.bytes {
|
||||
additional_info.push(format!("{} bytes", bytes.len()));
|
||||
}
|
||||
if !additional_info.is_empty() {
|
||||
info += &format!(" ({})", additional_info.join(", "));
|
||||
}
|
||||
|
||||
ui.label(info);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user