Floyd Wang
1358b2906e
Bump gpui ( #1324 )
...
* Wireup the `Pixels` change
https://github.com/zed-industries/zed/pull/39367 .
2025-10-03 14:32:29 +08:00
Jason Lee
5e504d10bb
chore: Refactor tab key to switch focus. ( #991 )
...
Wait https://github.com/zed-industries/zed/pull/33008 ,
https://github.com/zed-industries/zed/pull/34804 to merge.
https://github.com/user-attachments/assets/3c21ebc9-44a0-4311-bb0f-5f63fe8d4bb3
- Improved `focus_ring` to render like an outline.
- Added to support press `Enter`, `Space` key to trigger Checkbox,
Button, Radio.
## Break Changes
- The `FocusableExt` has been changed to only for crate internal.
- The `FocusableCycle` has been removed, now GPUI has it own tab stop
implementation.
2025-09-29 16:48:24 +08:00
ihavecoke
163b540681
tiles: Add panels method. ( #1112 )
2025-08-04 19:33:28 +08:00
Jason Lee
cb6695c774
dock: Adjust tab panel menu button position to align with content. ( #1106 )
...
## Before
<img width="1316" height="981" alt="image"
src="https://github.com/user-attachments/assets/ad2a96a0-5e82-4caa-85da-76f24d4deef1 "
/>
## After
<img width="1306" height="796" alt="image"
src="https://github.com/user-attachments/assets/abc2d5d5-d9de-4cf0-9c39-eb965ffb9c46 "
/>
2025-07-30 16:35:25 +08:00
Jason Lee
e2153c9198
dock: Hide panel toolbar when dock is collapsed. ( #1105 )
2025-07-30 15:38:14 +08:00
Jason Lee
7d3301d695
tab_bar: Fix some incorrect style in TabBar. ( #1078 )
...
This change to fix some incorrect style use, that will break in Taffy
0.5.2+
Ref https://github.com/zed-industries/zed/pull/34827
- Add `Tab::empty` to create a Tab without label.
- Fix form layout in Taffy new version.
- Update GPUI for scroll API changes.
2025-07-22 13:30:04 +08:00
Jason Lee
867b4ff3a6
dock: Open dock if clicked on the tab of the collapsed bottom dock. ( #1057 )
2025-07-14 18:49:31 +08:00
Jason Lee
d7e04ecdd0
scrollbar: Improve Scrollbar to get correct scroll size. ( #985 )
...
Continue #984
- Fixes there may Scrollbar size not match the content size. Close #979
- Improved Table scrollbar to only render at scrollable area when there
have fixed columns.
<img width="850" alt="image"
src="https://github.com/user-attachments/assets/84f54515-e61a-484f-b2b4-ea5abb98ddb8 "
/>
## Break Changes
- The `Scrollbar` has been removed `entity_id` and `scroll_size`
argument from new method, it will get that value from `scroll_handle`.
- There still have a `scroll_size` optional method, if you want to give
your own.
- Also changed the `scroll_state`, `scroll_handle` to receive a ref.
```diff
- Scrollbar::vertical(entity_id, scroll_state, scroll_handle, scroll_size);
+ Scrollbar::vertical(&scroll_state, &scroll_handle);
+ Scrollbar::vertical(&scroll_state, &scroll_handle).scroll_size(scroll_size);
```
2025-06-18 19:09:34 +08:00
Floyd Wang
56e282315d
dock: Bind actions only when the tab panel is not collapsed ( #964 )
2025-06-17 13:38:24 +08:00
Floyd Wang
f183236d52
dock: Hide suffix action when tab_panel is collapsed ( #963 )
2025-06-17 11:50:52 +08:00
Jason Lee
61283a71f0
scrollbar: Refactor ScrollbarState to have Cell inside. ( #959 )
...
## Break Change
- Now we added `Rc<Cell<>>` inside the ScrollbarState.
```diff
- scroll_state: Rc<Cell<ScrollbarState>>,
+ scroll_state: ScrollbarState,
```
2025-06-16 15:11:52 +08:00
Floyd Wang
2febe2611b
dock: Use disabled instead of hiding the zoom menu ( #949 )
2025-06-12 12:10:03 +08:00
Jason Lee
a95482fdd8
chore: Upgrade GPUI 2025/05/26 with inspector changes. ( #895 )
...
https://github.com/zed-industries/zed/pull/31315
2025-05-26 13:40:27 +08:00
Jason Lee
769b1887d0
dock: Ensure add panel to StackPanel is type of TabPanel or StackPanel. ( #862 )
2025-05-17 22:42:03 +08:00
Jason Lee
1e2cc8315a
dock: Show keybinding for ToggleZoom menu and button. ( #861 )
...
And binding `Shift-Esc` for example to toggle zoom panel, `Ctrl-W` for
close panel.

2025-05-17 22:23:45 +08:00
Jason Lee
1535df796e
resizable: Refactor to use stateless Resizable element. ( #852 )
...
## Break Changes
- The `ResizablePanelGroup` and `ResizablePanel` are changed to as
stateless element, please check out the diff to migrate.
2025-05-12 17:15:11 +08:00
Jason Lee
0a95f7c0f1
resizable: Add size_range to limit panel size and fix resize and initial_size of panel. ( #844 )
...
## Fix panel resize bug
- Fix some panel resizing details.
- Fix initial_size for panel and ensure split dock panel to get average
size.
### Before
https://github.com/user-attachments/assets/cd6c7e10-aec7-46a6-8a4d-11bf4d221f92
### After
https://github.com/user-attachments/assets/90c8b865-630a-4abd-98c9-310800b12fee
2025-05-12 11:07:06 +08:00
Jason Lee
8bea37ed74
dock: Update drop panel target mask to 50% of panel. ( #845 )
2025-05-09 22:55:48 +08:00
Jason Lee
d288a51e06
dock: Revert panel radio size to back to use Pixels type for panel size. ( #842 )
...
This PR to revert previous dock changes to back to use `Pixels` type for
panel size.
- #833
- #839
- #840
2025-05-09 16:47:24 +08:00
Jason Lee
f8e30c6f5d
dock: Revert dock to use absolute size. ( #840 )
...
This change to revert `Dock` to use `Pixels` for size, not use ratio,
because in most case we need to keep dock size, not wants it change when
window resize, we just only want center dock to change.
The `Panel` will keep the relative size changes.
2025-05-08 16:29:55 +08:00
Jason Lee
a26311dc0e
dock: Improve dock, panel to support absolute or fraction size. ( #839 )
2025-05-08 12:01:16 +08:00
Jason Lee
6514aec22a
dock: Refactor to use ratio for dock, panel size. ( #833 )
2025-05-07 01:32:31 +08:00
Jakku Sakura
3051b9c1c4
dock: Fix to sync active state to panels when collapse dock. ( #770 )
...
This is a continuation of #764
Without this, if we drag webview to sidebar and collapse, webview is not
aware of itself being hidden
<img width="994" alt="image"
src="https://github.com/user-attachments/assets/6d8d66d1-2a9b-472a-a42f-d04b47aefaac "
/>
2025-04-03 13:13:29 +08:00
Jason Lee
c310afadc6
tile: Add to support resize tile from left and top side. ( #756 )
2025-03-31 19:35:02 +08:00
Floyd Wang
417e097b1a
dock: Add tab_name for collapsed tab panels ( #751 )
2025-03-28 11:44:34 +08:00
Jason Lee
ffa36c1c5b
input: Add focused_input, has_focused_input method to Root. #727
...
Add this to save current focused Input, this used to avoid some special keybinding conflict.
For example: `/` as ToggleSearch, if on this action, we can check is there `has_focused_input` to decide to ignore or handle action.
- dock: Rename toggle button visible method.
2025-03-21 17:34:32 +08:00
Floyd Wang
0d1c40a56a
dock: Support hide dock toggle buttons ( #726 )
2025-03-21 11:55:02 +08:00
Jason Lee
a89f971108
chore: Update GPUI 2025/03/20 and fix spawn method. ( #725 )
...
- Update `resvg`, `usvg` to 0.45.0
2025-03-20 21:23:50 +08:00
Floyd Wang
7442aa1fba
dock: Fixed panels will lose height when dragged to minimum ( #718 )
...
## Before
https://github.com/user-attachments/assets/c49464bf-6106-422b-b948-83c5b4c4de60
## After
https://github.com/user-attachments/assets/b83fba18-ecfd-458f-8f25-5d59a60a66cb
2025-03-14 15:55:51 +08:00
Jason Lee
df94217999
tiles: Fix back panels flick when hover on top panel in tiles. ( #708 )
...
- Move resize handle out of the panel to avoid conflict with scrollbar.
2025-03-11 19:56:50 +08:00
Floyd Wang
f8a530279a
dock: Fix incorrect extra inner padding in Panels. ( #682 )
2025-03-04 17:22:17 +08:00
Jason Lee
c4331c9419
tab: Improve TabBar API. ( #678 )
...
- Fixed scroll support for TabBar.
- Remove `id` argument from Tab, it will set from TabBar iter.
- Add `id` to TabBar to ensure scroll_handle state will store correct.
- Update `label` argument of Tab, to use `impl Into<SharedString>` type
for better use.
- Added `child` to Tab for render custom element as label.
2025-03-03 19:48:28 +08:00
Jason Lee
bc89ce2536
tab: Add to support string children for TabBar. ( #677 )
...
## Break changes
- Removed `id` argument from `TabBar::new` method.
2025-03-03 17:34:17 +08:00
Jason Lee
1aa43b1bfe
tab: Add Pill, Segmented, Underline style Tab and complete the Tab API. ( #676 )
...
<img width="985" alt="image"
src="https://github.com/user-attachments/assets/3d3860ff-ac7c-459a-bb6e-d0ea09b8eac8 "
/>
<img width="936" alt="image"
src="https://github.com/user-attachments/assets/abb39b8f-4139-4f41-9c12-2a22f767bec0 "
/>
<img width="985" alt="image"
src="https://github.com/user-attachments/assets/9fccce5f-8da5-4c78-8679-1a85dcfc56f0 "
/>
Run example:
```
cargo run --example tabs
```
2025-03-03 17:09:52 +08:00
Jason Lee
76efa2715b
tiles: Fix panels get item out of bound error when removed some panel. ( #675 )
2025-02-28 18:53:25 +08:00
Jason Lee
9732c3b7e8
tiles: To support close panel. ( #674 )
...
- Add `remove_panel` method to DockArea.
2025-02-28 18:36:58 +08:00
Jason Lee
5cf11ffe1b
tiles: Remove cursor style on Tile's title. ( #673 )
2025-02-28 16:57:01 +08:00
Jason Lee
7eaac7b171
chore: Update TabPanel closable doc. ( #672 )
2025-02-28 15:40:33 +08:00
Jason Lee
e443a219be
panel: Add title_suffix to panel and write a custom container panel example. ( #669 )
...
- Add to support `xsmall` size for TextInput.
- Add `global`, `global_mut`, `build_panel` static method to
`PanelRegistry`.
<img width="1011" alt="image"
src="https://github.com/user-attachments/assets/1a6e61c4-502a-4d1c-a4ea-2644777fd4d8 "
/>
2025-02-27 14:52:28 +08:00
Jason Lee
98625edf01
tiles: Fix active_panel method to returns actually Panel view, avoid return TabPanel. ( #665 )
...
- Limit `add_item` only allows TabPanel type.
- Export `items` method in DockArea.
2025-02-26 11:33:58 +08:00
Floyd Wang
dc4d7e614c
dock: Panel trait set_zoomed with mutable window and cx ( #661 )
...
Need Update panel functions to mutable `self`, `window` and `cx`.
2025-02-25 14:34:49 +08:00
Floyd Wang
f75f96f135
dock: Panel trait set_active with mutable window and cx ( #659 )
2025-02-25 14:15:42 +08:00
Jason Lee
806c6dffe8
tiles: Add active_panel method to Tiles. ( #656 )
2025-02-25 12:00:43 +08:00
Floyd Wang
9739493bce
dock: Add mutable reference for set_active ( #655 )
2025-02-25 11:46:54 +08:00
ihavecoke
c303b84303
dock: Add item to tiles layout should use default TabPanel view ( #645 )
2025-02-23 22:22:27 +08:00
ihavecoke
03d5f83a83
dock: Implement core panel addition logic for tiling layout ( #644 )
2025-02-20 21:20:59 +08:00
ihavecoke
6c39078e8a
dock: Add drag drop event for tiles ( #640 )
2025-02-19 22:20:48 +08:00
Jason Lee
c62be93da6
panel: Reduce tool buttons gap from 8px to 4px. ( #636 )
...
<img width="314" alt="image"
src="https://github.com/user-attachments/assets/eab5f4f8-b604-4c5c-bfd4-2535340b1d1e "
/>
And use `selected` style for zoom button when zoomed:
<img width="114" alt="image"
src="https://github.com/user-attachments/assets/fa11ec81-a4db-42ea-8edc-39ed8ad40ba1 "
/>
2025-02-17 14:46:44 +08:00
Jason Lee
2c377985bb
tiles: Limit panel x to out of bounds, but keep retaining 64px. ( #632 )
...
- Adjust `tile_grid_size` default to `8px`.
- Fix unexpected scroll size by `-1px` design.
2025-02-17 11:51:10 +08:00
Jason Lee
d446c0e7b3
tile: Add to support setup tiles background color, tile_shadow, tile_grid_size. ( #631 )
2025-02-17 10:49:26 +08:00