gpui-component/crates/ui
reya 07a8e70d1a
dock: Add DockItem::panel (#464)
**Description**:
Improve the flexibility of `DockArea`, sometime user won't need a
`TabPanel`, just display some message or UI elements. Curren implement
only allow use Tab or Split. So this PR will add `Plain` to `DockItem`,
user can put anything which implement `PanelView` trait.

**Usage**:
```rust
let left_panels = DockItem::panel(Arc::new(<- PanelView ->));

_ = dock_area.update(cx, |view, cx| {
    view.set_version(DOCK_AREA.version, cx);
    view.set_left_dock(left_panels, Some(px(260.)), true, cx);
    view.set_center(dock_item, cx);
    view.set_dock_collapsible(
        Edges {
            left: false,
            ..Default::default()
        },
        cx,
    );
});
```

**Screenshot**
<img width="1300" alt="image"
src="https://github.com/user-attachments/assets/a01e427c-50f1-4509-82d1-76cc016aa7b3">
2024-12-05 11:12:08 +08:00
..
assets/fonts svg_img: Embed the font file (#401) 2024-11-08 15:45:00 +08:00
locales dock: Add left, bottom, right fixed dock and support toggle. (#291) 2024-10-02 17:42:52 +08:00
src dock: Add DockItem::panel (#464) 2024-12-05 11:12:08 +08:00
tests/fixtures dock: Add to support save left, right, bottom dock state. (#303) 2024-10-03 17:25:31 +08:00
Cargo.toml build(deps): bump wry from 0.47.0 to 0.47.2 (#434) 2024-11-26 13:29:03 +08:00
default-colors.json Add Skeleton (#128) 2024-08-09 15:55:48 +08:00
LICENSE-APACHE Add Dock & Panel (#10) 2024-07-01 14:20:56 +08:00