summaryrefslogtreecommitdiff
path: root/crates/iced_drop
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2025-06-07 10:07:12 +0200
committerpml68 <contact@pml68.dev>2025-06-07 10:08:03 +0200
commitbb05cf8adfaf20c72ec81f18161f3e2ff5dc6da5 (patch)
tree9c62153f5508b0ac7d0b4c3fbb913423e4e03a69 /crates/iced_drop
parentchore: update dependencies (diff)
downloadiced-builder-bb05cf8adfaf20c72ec81f18161f3e2ff5dc6da5.tar.gz
fix: animated theme change on startup when config theme != "Dark"
Diffstat (limited to 'crates/iced_drop')
-rw-r--r--crates/iced_drop/src/widget/droppable.rs20
1 files changed, 9 insertions, 11 deletions
diff --git a/crates/iced_drop/src/widget/droppable.rs b/crates/iced_drop/src/widget/droppable.rs
index 063aef8..0e93bd0 100644
--- a/crates/iced_drop/src/widget/droppable.rs
+++ b/crates/iced_drop/src/widget/droppable.rs
@@ -462,19 +462,17 @@ where
let state = tree.state.downcast_ref::<State>();
- if self.on_drop.is_none() && cursor.is_over(layout.bounds()) {
- return mouse::Interaction::NotAllowed;
- }
-
- if let Action::Drag(_, _) = state.action {
- return mouse::Interaction::Grabbing;
- }
-
if cursor.is_over(layout.bounds()) {
- return mouse::Interaction::Pointer;
+ if self.on_drop.is_none() {
+ mouse::Interaction::NotAllowed
+ } else if let Action::Drag(_, _) = state.action {
+ mouse::Interaction::Grabbing
+ } else {
+ mouse::Interaction::Pointer
+ }
+ } else {
+ mouse::Interaction::default()
}
-
- mouse::Interaction::default()
}
}