ZIm/crates/editor
Finn Evers a605b66ce1
editor: Do not insert scrollbar hitboxes when scrollbars are disabled (#27467)
This PR fixes an issue where a clickable scrollbar track was inserted in
the editor even when scrollbars were explicitly disabled via the user's
settings. If the user has

```json
"scrollbar": {
    "show": "never"
}
```
in their settings, invisible and interactable scrollbar tracks will be
inserted in the editor if scrollbars would be required, as seen below:


https://github.com/user-attachments/assets/b0d915a9-7a7e-4518-84d8-96d9b15aab12

The bug occurs because we only set the scrollbar contents to be
invisible, which however does not affect the insertion of hitboxes for
the scrollbars.

This PR fixes this behaviour by preventing any scrollbar layouting from
happening when scrollbars are explicitly disabled via the settings:


https://github.com/user-attachments/assets/a3f5725b-aead-4fec-9fd8-e574cf269d45

All existing panels which have configurable scrollbars behave the same
way, see
fb2586a553/crates/outline_panel/src/outline_panel.rs (L4362-L4373)

for example. Following this check, neither a thumb nor a track is
inserted in any case when scrollbars are never to be shown.

Release Notes:

- Fixed invisible scrollbar tracks being inserted into the editor when
scrollbars are explicitly disabled via settings.
2025-03-26 01:44:35 +01:00
..
src editor: Do not insert scrollbar hitboxes when scrollbars are disabled (#27467) 2025-03-26 01:44:35 +01:00
Cargo.toml Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00