summaryrefslogtreecommitdiff
path: root/iced_drop/src/widget/droppable.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.me>2024-10-04 00:44:02 +0200
committerpml68 <contact@pml68.me>2024-10-04 00:44:02 +0200
commit510d68b92972b99868e187dd5340f04780b4c354 (patch)
tree6d0937824d8606423b5afef2a16e182a3a984f8f /iced_drop/src/widget/droppable.rs
parentfeat: implement fmt::Display for RenderedElement, work on props (diff)
downloadiced-builder-510d68b92972b99868e187dd5340f04780b4c354.tar.gz
feat: update to iced 0.13.1, basic project state file, prepare for drag&drop
Diffstat (limited to '')
-rw-r--r--iced_drop/src/widget/droppable.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/iced_drop/src/widget/droppable.rs b/iced_drop/src/widget/droppable.rs
index ed7dcbd..80d8600 100644
--- a/iced_drop/src/widget/droppable.rs
+++ b/iced_drop/src/widget/droppable.rs
@@ -228,8 +228,10 @@ where
state.action = Action::Drag(start, position);
// update the position of the overlay since the cursor was moved
if self.drag_center {
- state.overlay_bounds.x = position.x - state.overlay_bounds.width / 2.0;
- state.overlay_bounds.y = position.y - state.overlay_bounds.height / 2.0;
+ state.overlay_bounds.x =
+ position.x - state.overlay_bounds.width / 2.0;
+ state.overlay_bounds.y =
+ position.y - state.overlay_bounds.height / 2.0;
} else {
state.overlay_bounds.x = state.widget_pos.x + position.x - start.x;
state.overlay_bounds.y = state.widget_pos.y + position.y - start.y;
@@ -315,7 +317,7 @@ where
tree: &mut Tree,
layout: Layout<'_>,
renderer: &Renderer,
- operation: &mut dyn Operation<Message>,
+ operation: &mut dyn Operation,
) {
let state = tree.state.downcast_mut::<State>();
operation.custom(state, self.id.as_ref());