project panel: Fix rendering of groups of dragged project panel entries (#20686)
This PR introduces a new parameter for `on_drag` in gpui, which is an offset from the element origin to the mouse event origin. Release Notes: - Fixed rendering of dragged project panel entries
This commit is contained in:
parent
43999c47e1
commit
56c93be4de
5 changed files with 30 additions and 17 deletions
|
@ -605,7 +605,7 @@ impl Render for Dock {
|
|||
let create_resize_handle = || {
|
||||
let handle = div()
|
||||
.id("resize-handle")
|
||||
.on_drag(DraggedDock(position), |dock, cx| {
|
||||
.on_drag(DraggedDock(position), |dock, _, cx| {
|
||||
cx.stop_propagation();
|
||||
cx.new_view(|_| dock.clone())
|
||||
})
|
||||
|
|
|
@ -1950,7 +1950,7 @@ impl Pane {
|
|||
is_active,
|
||||
ix,
|
||||
},
|
||||
|tab, cx| cx.new_view(|_| tab.clone()),
|
||||
|tab, _, cx| cx.new_view(|_| tab.clone()),
|
||||
)
|
||||
.drag_over::<DraggedTab>(|tab, _, cx| {
|
||||
tab.bg(cx.theme().colors().drop_target_background)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue