ZIm/crates/workspace/src
Finn Evers 2fe1293fba
Improve cursor style behavior for some draggable elements (#31965)
Follow-up to #24797

This PR ensures some cursor styles do not change for draggable elements
during dragging. The linked PR covered this on the higher level for
draggable divs. However, e.g. the pane divider inbetween two editors is
not a draggable div and thus still has the issue that the cursor style
changes during dragging. This PR fixes this issue by setting the hitbox
to `None` in cases where the element is currently being dragged, which
ensures the cursor style is applied to the cursor no matter what during
dragging.

Namely, this change fixes this for
- non-div pane dividers
- minimap slider and the
- editor scrollbars

and implements it for the UI scrollbars (Notably, UI scrollbars do
already have `cursor_default` on their parent container but would not
keep this during dragging. I opted out on removing this from the parent
containers until #30194 or a similar PR is merged).


https://github.com/user-attachments/assets/f97859dd-5f1d-4449-ab92-c27f2d933c4a

Release Notes:

- N/A
2025-06-06 16:56:27 -04:00
..
persistence Use read-only access methods for read-only entity operations (#31479) 2025-05-26 23:04:31 -04:00
dock.rs workspace: Add setting to make dock resize apply to all panels (#30551) 2025-06-04 17:40:35 +00:00
history_manager.rs History manager (#26369) 2025-04-11 21:34:51 +00:00
item.rs Option to auto-close deleted files with no unsaved edits (#31920) 2025-06-03 13:18:29 +02:00
modal_layer.rs editor: Hide mouse context menu when modal is opened (#29127) 2025-04-21 20:13:26 +05:30
notifications.rs Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
pane.rs Fix panic when dragging pinned item left in pinned region (#32263) 2025-06-06 15:35:18 -04:00
pane_group.rs Improve cursor style behavior for some draggable elements (#31965) 2025-06-06 16:56:27 -04:00
persistence.rs zlog: Replace usages of env_logger in tests with zlog (#31436) 2025-05-26 11:48:50 -04:00
searchable.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
shared_screen.rs Add searchable global tab switcher (#28047) 2025-04-28 09:21:27 +00:00
status_bar.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
tasks.rs Unify the tasks modal and the new session modal (#31646) 2025-05-29 21:33:52 -04:00
theme_preview.rs Rename debug: commands to dev: (#30675) 2025-05-14 11:15:27 +02:00
toast_layer.rs Move workspace::toast_layer::RunAction to zed_actions::toast::RunAction (#32222) 2025-06-06 06:23:09 +00:00
toolbar.rs Fix toolbar spacing regressions (#29964) 2025-05-05 22:28:35 -03:00
workspace.rs Improve cursor style behavior for some draggable elements (#31965) 2025-06-06 16:56:27 -04:00
workspace_settings.rs workspace: Add setting to make dock resize apply to all panels (#30551) 2025-06-04 17:40:35 +00:00