From bb05cf8adfaf20c72ec81f18161f3e2ff5dc6da5 Mon Sep 17 00:00:00 2001 From: pml68 Date: Sat, 7 Jun 2025 10:07:12 +0200 Subject: fix: animated theme change on startup when config theme != "Dark" --- crates/iced_drop/src/widget/droppable.rs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'crates') 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::(); - 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() } } -- cgit v1.2.3