diff options
| author | pml68 <contact@pml68.dev> | 2025-06-07 10:07:12 +0200 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-06-07 10:08:03 +0200 |
| commit | bb05cf8adfaf20c72ec81f18161f3e2ff5dc6da5 (patch) | |
| tree | 9c62153f5508b0ac7d0b4c3fbb913423e4e03a69 /crates | |
| parent | chore: update dependencies (diff) | |
| download | iced-builder-bb05cf8adfaf20c72ec81f18161f3e2ff5dc6da5.tar.gz | |
fix: animated theme change on startup when config theme != "Dark"
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/iced_drop/src/widget/droppable.rs | 20 |
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() } } |
