gpui-component/crates/ui
Jason Lee 118a0f500e
scrollbar: Introduce overflow_scrollbar to adds Scrollbars to elements. (#1694)
## Description

1. Add `overflow_scrollbar`, `overflow_y_scrollbar`, `overflow_x_scroll`
to GPUI elements to let them has scrollbars. It is almost like the
`overscroll` but adds the Scrollbar.
2. And adjust the display scrollbar of margining 4px of the container.
3. Add `scrollbar`, `vertical_scrollbar`, `horizontal_scrollbar` with
your own scroll handle.

<img width="1181" height="911" alt="image"
src="https://github.com/user-attachments/assets/8b02cd54-d527-4f22-b9be-f762ede22122"
/>

## Break Changes

- There `Scrollable` trait and it `scrollable` method has been removed.

```diff
- div().id("contents").scrollable(Axis::Vertical)
+ div().id("contents").overflow_y_scrollbar()
```
2025-11-27 11:29:50 +00:00
..
locales setting: Add Settings component. (#1632) 2025-11-20 13:51:44 +00:00
src scrollbar: Introduce overflow_scrollbar to adds Scrollbars to elements. (#1694) 2025-11-27 11:29:50 +00:00
tests/fixtures dialog: Rename Modal to Dialog. (#1538) 2025-11-07 17:25:55 +08:00
Cargo.toml Bump v0.5.0-preview0 2025-11-27 14:49:36 +08:00
LICENSE-APACHE chore: Hard link crates/ui/LICENSE-APACHE. 2025-11-04 17:54:14 +08:00