gpui-component/crates/ui
Jason Lee 4a3f520c5f
scrollbar: Manage ScrollbarState in Scrollbar internal. (#1690)
This PR to improve the Scrollbar API to manage the state in the
internal.

## Break Changes

Describe any breaking changes introduced by this pull request. If none,
remove this section.

- Removed `scrollbar_state` argument from `Scrollbar::new`,
`Scrollbar::both`, `Scrollbar::vertical` and `Scrollbar::horizontal`.

```diff
- Scrollbar::horizontal(&self.scrollbar_state, &self.scroll_handle)
+ Scrollbar::horizontal(&self.scroll_handle)

- Scrollbar::vertical(&self.scrollbar_state, &self.scroll_handle)
+ Scrollbar::vertical(&self.scroll_handle)
```

- Change `struct ScrollbarState` to private, we not need this not.

```diff
- pub struct ScrollbarState {
+ struct ScrollbarState {
```

- Renamed `trait ScrollHandleOffsetable` to `trait ScrollbarHanle`.

```diff
- pub trait ScrollHandleOffsetable {
+ pub trait ScrollbarHanle {
```

- Removed `Scrollbar::both`, now use `Scrollbar::new` instead.

```diff
- Scrollbar::both(&scroll_handle)
+ Scrollbar::new(&scroll_handle)
```
2025-11-27 11:39:58 +08:00
..
locales setting: Add Settings component. (#1632) 2025-11-20 13:51:44 +00:00
src scrollbar: Manage ScrollbarState in Scrollbar internal. (#1690) 2025-11-27 11:39:58 +08:00
tests/fixtures dialog: Rename Modal to Dialog. (#1538) 2025-11-07 17:25:55 +08:00
Cargo.toml chore: Update to use Rust edition 2024. (#1669) 2025-11-24 14:38:43 +08:00
LICENSE-APACHE chore: Hard link crates/ui/LICENSE-APACHE. 2025-11-04 17:54:14 +08:00