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:
Piotr Osiewicz 2024-11-14 19:29:18 +01:00 committed by GitHub
parent 43999c47e1
commit 56c93be4de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 30 additions and 17 deletions

View file

@ -2521,7 +2521,7 @@ impl CollabPanel {
.flex()
.w_full()
.when(!channel.is_root_channel(), |el| {
el.on_drag(channel.clone(), move |channel, cx| {
el.on_drag(channel.clone(), move |channel, _, cx| {
cx.new_view(|_| DraggedChannelView {
channel: channel.clone(),
width,