Jason Lee
a0f6b48eff
chore: Update GPUI 2025/01/14 ( #547 )
2025-01-14 19:21:04 +08:00
Jason Lee
7848311046
list, table: Add default loading animation to List and Table. ( #546 )
...
<img width="485" alt="image"
src="https://github.com/user-attachments/assets/568cbf3a-6e32-4b21-8816-5e3cb26acc82 "
/>
<img width="755" alt="image"
src="https://github.com/user-attachments/assets/5e13d6b8-e6f4-4cc3-b1f6-9b378ff523a4 "
/>
2025-01-14 11:36:33 +08:00
ihavecoke
1d18edef12
list: Allow disabling List selection. ( #545 )
...
## Break changes
- Renamed list `enable_scrollbar` to `scrollbar_visible` to match with
the table API.
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-01-14 10:05:49 +08:00
Jason Lee
1218ceb7dc
table: Add scrollbar_visible to Table for control the scrollbar visibility. ( #544 )
...
Ref #513 #542
Add this to ability to render some custom view on top of the table, but
below of the scrollbar.
## Break changes
- table: Renamed `scrollbar_state` to `vertical_scrollbar_state`.
- table: Removed `scroll_handle` and `horizontal_scroll_handle` method,
there have a pub `vertical_scroll_handle` and `horizontal_scroll_handle`
prop.
2025-01-13 14:59:03 +08:00
Ylin
eb10186463
table: Add visible_rows_changed, visible_cols_changed method to table delegate. ( #543 )
...
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-01-13 13:51:20 +08:00
Jason Lee
205a499bc9
table: Revert deferred render scrollbr for table. ( #542 )
...
This will make scrollbar always stay on top, even there have other
element cover it.
2025-01-12 22:32:43 +08:00
Floyd Wang
464fceac96
theme: Rename destructive to danger ( #541 )
2025-01-10 15:16:19 +08:00
Floyd Wang
31736b0e21
badge: Add new component ( #540 )
...
<img width="137" alt="image"
src="https://github.com/user-attachments/assets/6d7008b2-fe0f-4c4e-bd16-1dd8ae883f11 "
/>
<img width="118" alt="image"
src="https://github.com/user-attachments/assets/3137dd88-5038-4c59-90c1-cee2cdc542bd "
/>
2025-01-10 14:28:27 +08:00
Floyd Wang
2aad7e412a
tag: Rename badge to tag ( #539 )
2025-01-10 10:28:47 +08:00
Floyd Wang
ceba66c22d
dock: Add PanelControl for pinning the toolbar button ( #537 )
...
<img width="387" alt="image"
src="https://github.com/user-attachments/assets/b3d3f2a8-dc4e-49e6-8e82-e7f551d70bc7 "
/>
2025-01-09 19:18:59 +08:00
Jason Lee
de42cc46a7
panel: Update Panel toolbar_buttons method to use ViewContext<Self>. ( #536 )
...
## Break changes
The `toolbar_buttons` trait method in Panel has been changed:
```diff
- fn toolbar_buttons(&self, cx: &WindowContext) -> Vec<Button>
+ fn toolbar_buttons(&self, cx: &mut ViewContext<Self>) -> Option<Vec<Button>>
```
2025-01-09 16:49:35 +08:00
Jason Lee
bf82e3db13
list, table: Add scroll_to_item to List, scroll_to_row to Table. ( #535 )
2025-01-09 14:23:46 +08:00
Floyd Wang
8aac2f75e4
popup_menu: More compact checked style ( #534 )
...
## Before
<img width="360" alt="image"
src="https://github.com/user-attachments/assets/be388143-efed-4a47-b4f7-11018fe22f99 "
/>
## After
<img width="336" alt="image"
src="https://github.com/user-attachments/assets/449b7dd3-c51f-4673-a068-34ac813d79fd "
/>
2025-01-08 18:37:14 +08:00
Floyd Wang
bf8eb3f459
ci: Fix lint
2025-01-08 16:25:35 +08:00
Floyd Wang
d48a6d4b43
table: Support clear selection ( #533 )
2025-01-08 16:18:49 +08:00
Jason Lee
3773337e04
list: Add load_more. ( #532 )
2025-01-08 15:05:40 +08:00
xda
da4c188bc6
input: Support Cmd+Up, Cmd+Down, Cmd+Shift+Up, Cmd+Shift+Down ( #531 )
...

2025-01-06 23:02:40 +08:00
Jason Lee
e012eb6d07
history: Add unique mode to keep unique item in History. ( #529 )
2025-01-06 19:19:36 +08:00
Jason Lee
99e51288e0
table: Binding popup menu on the table not on row for avoid render it on each rows. ( #528 )
...
- Add `TableEvent::DoubleClickedRow` to emit double clicked row event to
table.
2025-01-03 18:10:07 +08:00
Jason Lee
5be03543dd
history: Export undos, redos methods, and add clear method. ( #527 )
2025-01-03 16:57:00 +08:00
xda
8b89b5ba7c
input: Fix TextInput cursor getting stuck on Down key press ( #526 )
...
## Before

## After

2025-01-03 14:46:51 +08:00
xda
0cc6b90cde
input: Handle moving above the first line ( #525 )
2025-01-03 12:22:48 +08:00
Jason Lee
482a31fa19
input: Fix TextArea enter to newline not work and scroll to visible on move cursor. ( #523 )
...
Close #494
- Fix enter to newline.
- Fix to ensure scroll on move cursor or enter.
2024-12-31 19:19:14 +08:00
xda
66d9a34844
tiles: Add History<I> to track changes with undo, redo methods. ( #510 )
...

2024-12-31 18:47:21 +08:00
Jason Lee
ecce9f2633
number_input: Fix Number Input border to use cx.theme.input. ( #521 )
2024-12-27 19:03:24 +08:00
Jason Lee
d7cd0e54c2
list: Fix selected and confirmed list item detail. ( #520 )
...
Closes #519 to fix popup_menu attempt to subtract with overflow bug.
2024-12-27 18:41:27 +08:00
Jason Lee
0327df323d
modal: Fix Model, Drawer overlay size on tiling mode. ( #518 )
2024-12-27 17:22:02 +08:00
Jason Lee
6851e53183
dock: Fix to active prev tab, when current tab is invisible. ( #517 )
2024-12-27 11:58:19 +08:00
Jason Lee
9eba97ddf6
modal: Fix modal, drawer overlay position on Linux. ( #515 )
...
- Update `overlay` for Modal, still handle click out to dismiss, even it
no overlay.
2024-12-24 14:43:37 +08:00
Jason Lee
6acbfb5298
root: Fix window border and add cx.theme().window_border
2024-12-24 13:48:28 +08:00
Jason Lee
466c5e2005
root: Add window shadow to Root for support window border style on Linux. ( #514 )
...
And fix the title bar buttons click handle on Linux.
2024-12-24 13:33:06 +08:00
Jason Lee
3601cb399b
table: Use deferred to render scrollbar to avoid some element overflow it. ( #513 )
2024-12-24 11:40:50 +08:00
Jason Lee
ea0954b425
drawer: Render notification at the side of drawer when drawer (top, right) it opened. ( #512 )
...
This change to make sure notification will display when WebView render
on the drawer.

2024-12-24 09:46:40 +08:00
Jason Lee
d051ac6a8c
table: Update last empty column to 20px width. ( #511 )
2024-12-23 19:36:58 +08:00
Jason Lee
11dbdb125a
chore: Removed ScrollableAxis use Axis instead. ( #509 )
2024-12-23 15:30:36 +08:00
Jason Lee
500aa2d7c5
table: Fix to only handle one way scrolling at same time. ( #507 )
...
Closes #314
2024-12-20 22:07:01 +08:00
Jason Lee
28463d3a18
panel: Fix panel to unexpected size chagnes when moved some panel. ( #506 )
...
### Before
https://github.com/user-attachments/assets/9174033b-d901-412f-9176-cdef6438822f
2024-12-20 19:15:31 +08:00
Jason Lee
57c1da2441
panel: To keep panel size when it going to hidden. ( #505 )
...
This change for make sure when Panel to hide and show, the original
panel size will keep.
2024-12-20 19:02:55 +08:00
xda
6a310c618f
input: Up, Down to keep the same column if it possible ( #500 )
...
Fix #468
2024-12-20 18:21:22 +08:00
Jason Lee
2f4b7a3eca
virtual_list: Try to use second item to measure. ( #504 )
2024-12-20 18:15:33 +08:00
Jason Lee
1a4ee348f8
dock: Add visible method to Panel trait to control panel visible. ( #503 )
...
Closes #502 #499
## Added
- Add `visible` method to `Panel` trait, if return false this panel will
disappear.
## Break changes
- Renamed `closeable` to `closable`.
- The `title_style`, `closable`, `zoomable` in `Panel` trait have been
change `cx: &WindowContext` to `cx: &AppContext`.
2024-12-20 10:21:21 +08:00
Jason Lee
4b211bfe21
panel: Add set_active, set_zoomed method to Panel trait. ( #501 )
...
It will called when the panel active, zoom state changed.
2024-12-19 10:29:58 +08:00
Jason Lee
4e3b988e24
theme: Fix secondary active color in light mode. ( #498 )
...
<img width="968" alt="image"
src="https://github.com/user-attachments/assets/e86a3772-227e-4223-adbd-fb0387f9d735 "
/>
2024-12-18 18:13:46 +08:00
Jason Lee
d4819b34aa
chore: Update GPUI with AnchorCorner renamed to Corner. ( #497 )
...
Ref https://github.com/zed-industries/zed/pull/22119
2024-12-18 18:02:47 +08:00
Jason Lee
24982fb78c
scrollbar: Improve thumb bounds for avoid trigger scrollbar. ( #496 )
2024-12-18 17:21:57 +08:00
Jason Lee
4f7ca4bb9a
virtual_list: Add VirtualList ( #495 )
...
Vistual List for render a large number of differently sized
rows/columns.
> NOTE: This must ensure each column width or row height.
Unlike the `uniform_list`, the each item can have different size. This
is useful for more complex layout, for example, a table with different
row height.
2024-12-18 16:38:58 +08:00
reya
8260b5f6a0
fix: wrong size variant in sizable trait ( #493 )
2024-12-17 09:22:48 +08:00
xda
5874c6974f
tiles: Add Tiles ( #435 )
...
## Break Changes
- Renamed `DockItemState` to `PanelState`.
- Renamed `DockItemInfo` to `PanelInfo`.
- Update `cx` type from `WindowContext` to `AppContext` for Panel trait
`panel_name` method.
## TODO
- [ ] Support merge panels into TabPanel.
- [ ] Support split panels into Tile.
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-12-16 20:33:14 +08:00
Jason Lee
a5a72fcb5a
panel: Avoid render panel when TabPanel is collapsed. ( #492 )
...
Close #488
- Fix `collapsed` sync to `TabPanel` when load state.
2024-12-13 11:23:00 +08:00
Jason Lee
d701baed28
dock: Do not active tab when drop to TabPanel right empty area. ( #491 )
2024-12-12 19:18:42 +08:00