Jason Lee
7a8eaefd30
story: Add very complex table data update example to test performance. ( #274 )
...
The example that used: 6000 rows x 60 cols, and refresh data every
100ms.
The CPU usage: 40% (macOS M4)
https://github.com/user-attachments/assets/40d6c64f-c658-4c7a-9251-fb76e17ec543
2024-09-26 19:40:07 +08:00
Floyd Wang
d2f26795eb
feat(list_item): Add stop_propagation/prevent_default when trigger click event ( #273 )
2024-09-26 11:55:02 +08:00
Jason Lee
098315ee92
button: Reduce px for compact small button. ( #271 )
...
<img width="882" alt="image"
src="https://github.com/user-attachments/assets/c41955ea-5126-4d1a-b2dd-dea2e4b89c9e ">
2024-09-25 21:48:44 +08:00
Jason Lee
2d6f478512
dock: Add zoomable support to Panel. ( #269 )
2024-09-24 22:37:29 +08:00
xda
1e44b5659f
table: Render table stripe on background even there is no enough rows ( #256 )
...
<img width="1202" alt="image"
src="https://github.com/user-attachments/assets/57a744c3-673a-4118-ba97-03837b0b9390 ">
- And add `flex_shrink_0` to table head.
Fix https://github.com/huacnlee/gpui-component/issues/160
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-09-24 22:07:27 +08:00
Jason Lee
2a331fcb79
theme: Add shadow option to support toggle shadow for base controls, default: true. ( #268 )
...
- Add shadow to Button if it enabled.
2024-09-24 10:52:01 +08:00
Jason Lee
3fc0b70639
dock: Keep invalid panel state info avoid missing the state. ( #267 )
...
Fix #257
2024-09-23 22:43:02 +08:00
Jason Lee
dc3dc4a9ec
table: Avoid Table handle mouse wheel event, when it is blocked by some other element like Modal. ( #261 )
2024-09-23 14:32:16 +08:00
xda
89414e1c3c
table: Toggle stripe and number of rows in Table Story ( #259 )
...

2024-09-23 11:58:16 +08:00
ihavecoke
2da13499e5
list: Add render_initial support to List. ( #258 )
...
Add a method to the List component to render the initial state. When
input is empty, you may need to render a special interface to the user.
This method can be called at this point
### Showcase
https://github.com/user-attachments/assets/39c61bfe-4451-43f9-b0d9-8f941ebd94dd
2024-09-21 01:53:32 +08:00
Floyd Wang
f20f573dbc
notification: Fix when multiple notifications pop up at the same time, autohide not work ( #255 )
2024-09-19 17:33:49 +08:00
Jason Lee
20926b7077
popover: Fix PopoverContent content build to use ViewContext<Self>. ( #254 )
...
And add popover self dismiss example.
## How to dismiss popover from inside.
```rs
cx.emit(DismissEvent);
```
2024-09-19 10:54:04 +08:00
Jason Lee
9fc7b29f23
Upgrade GPUI ( #253 )
2024-09-18 14:27:47 +08:00
Jason Lee
08a160e543
button: Apply disable color to ButtonStyleCustom.
2024-09-17 21:15:48 +08:00
Jason Lee
d641c219a1
button: Use primary or danger color for the disable background. ( #252 )
...
<img width="1624" alt="image"
src="https://github.com/user-attachments/assets/61162ba5-9188-4cad-a154-2584abd0fd31 ">
Fix #251
2024-09-17 21:01:06 +08:00
Jason Lee
8f0ba2e5c3
modal: Only focus modal when it not focused on. ( #250 )
...
- Fix dropdown to mouse down out to dismiss.
https://github.com/user-attachments/assets/f5ab4aca-bfdc-460e-ae5a-cd0a31a30906
2024-09-17 18:48:06 +08:00
Jason Lee
97e61a507b
otp_input: Fix OtpInput to stop_propagation on keydown. ( #249 )
2024-09-17 10:55:09 +08:00
Floyd Wang
90c5125abc
Reduce popover border radius ( #248 )
2024-09-17 10:26:47 +08:00
Jason Lee
f77993082d
input: Update Input selection behavior to like OS input. ( #247 )
...
Revert old implementation
- https://github.com/huacnlee/gpui-component/pull/26
- https://github.com/zed-industries/zed/pull/14340
## Before
https://github.com/user-attachments/assets/52ce2e3a-3e1d-4ba2-af42-76b1df987404
## After
https://github.com/user-attachments/assets/9aa8cfe1-5928-4d20-b534-806140c7ee59
## The Input in the Browser
https://github.com/user-attachments/assets/c913248e-b1dc-46d6-a517-e1231e606171
2024-09-17 09:58:07 +08:00
Jason Lee
0e16d742bb
list: Add set_size method to List and fix input size in small dropdown. ( #246 )
2024-09-16 19:57:49 +08:00
Jason Lee
75b4f34b92
Try fix Button, Checkbox, Radio text line-height ( #240 )
...
<img width="1202" alt="屏幕截图 2024-09-12 224306"
src="https://github.com/user-attachments/assets/b96fee5e-6d39-4ba0-829c-3eaf4aed8ff2 ">
2024-09-16 10:36:18 +08:00
Jason Lee
d33b4b2ea0
dock: Fix panel zoom when it split and added to other StackPanel. ( #245 )
2024-09-16 10:18:04 +08:00
Jason Lee
55585f9699
windows: Fix button and checkbox line-height again. ( #244 )
...
<img width="1202"
src="https://github.com/user-attachments/assets/6741041a-f449-4600-bec1-751841dcec88 ">
2024-09-13 22:55:59 +08:00
Floyd Wang
d8ace3c683
clipboard: Refactor with Element ( #242 )
2024-09-13 13:53:39 +08:00
Jason Lee
a8d4abea69
button: Improve ButtonGroup to add style, size methods. ( #241 )
...
- Add `ButtonStyled` trait to apply the style for Button and
ButtonGroup.
2024-09-13 12:00:47 +08:00
xda
b83ece3cd8
Add ToggleButton (as part of ButtonGroup) ( #239 )
...

---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-09-13 11:58:10 +08:00
Jason Lee
a43e78e8ae
Upgrade GPUI
2024-09-13 09:43:11 +08:00
Jason Lee
ce87c3a001
modal: Improve Modal and Panel focus handle. ( #238 )
...
- modal: Improve modal focus take, when modal close, make sure focus
back.
- modal: Fix hover close button will cross to back modal on multiple
modal layer.
- panel: Add focus handle to Panel and TabPanel.
- panel: Update title method to return `AnyElement`.
2024-09-12 19:51:33 +08:00
Floyd Wang
9388b88f59
theme: Simplify init ( #237 )
2024-09-12 16:14:41 +08:00
Jason Lee
cf551654fe
scrollbar: Fix Scrollbar inset and remove bar border. ( #236 )
...
<img width="920" alt="image"
src="https://github.com/user-attachments/assets/f834a920-8f89-4be8-9100-d2b5e4364449 ">
2024-09-11 11:59:37 +08:00
Jason Lee
77cb8cb448
button: Hotfix Button to valign text center. ( #235 )
...
<img width="1336" alt="image"
src="https://github.com/user-attachments/assets/64029ab3-6447-47b1-a40c-f1e6668172b7 ">
2024-09-11 11:39:17 +08:00
xda
4f8c4ccd5d
scrollbar: Keep the original thumb position when mouse down to dragging ( #234 )
...

fix #224
2024-09-11 09:37:07 +08:00
Jason Lee
fbbb985e84
ui: Improve UI details (Modal, Checkbox, Radio and MenuItem) ( #233 )
...
- modal: Reduce modal title line height.
- checkbox, radio: Fix label line height to align with checkbox.
- menu: Update Menu item style, height to 28px, and fix divider padding.
<img width="523" alt="image"
src="https://github.com/user-attachments/assets/c254dc07-9d37-4885-b687-58ec4d8e95a4 ">
<img width="453" alt="image"
src="https://github.com/user-attachments/assets/3ad44419-1953-4048-8173-4d8c0646777a ">
<img width="369" alt="image"
src="https://github.com/user-attachments/assets/84d23eb2-15f9-47d7-b6d4-15295ab3a544 ">
2024-09-10 19:42:54 +08:00
Jason Lee
a0d3d35be4
modal: Add to support open multiple Modals. ( #232 )
...
- Add `Esc` to close modal.
2024-09-10 16:58:22 +08:00
ihavecoke
303dd51047
Use small size for calendar month item to fixed content overflow ( #231 )
2024-09-10 00:16:31 +08:00
Jason Lee
728be16a39
Fix windows dependency only on Windows.
2024-09-09 22:40:54 +08:00
Jason Lee
9bc4887d55
Update dependencies.
2024-09-09 22:33:41 +08:00
Jason Lee
74abc339b7
Fix bugs ( #230 )
...
- Fix color picker hover preview color to shrink_0.
- Fix Divider display.
2024-09-09 22:05:02 +08:00
Jason Lee
840a54850a
Update register_panel to use trait object Fn. ( #229 )
2024-09-09 19:19:27 +08:00
Jason Lee
d6d00f59a2
Add dump default impl for Panel trait.
2024-09-09 14:38:52 +08:00
Jason Lee
33f0291f6d
Improve layout save details for example app.
2024-09-09 14:03:51 +08:00
Sunli
ac83fad692
windows: Set the default stack size to 8M on Windows. ( #228 )
2024-09-09 13:51:10 +08:00
Jason Lee
16396d3583
Revert "Set the stack size of the main thread to 8M ( #227 )" is not work on macOS.
...
This reverts commit 2f80ba408a .
2024-09-09 13:34:31 +08:00
Jason Lee
bf134b2ff9
Add to support dump/load Dock layout. ( #226 )
2024-09-09 13:30:22 +08:00
Sunli
2f80ba408a
Set the stack size of the main thread to 8M ( #227 )
...
For fix stack overflow issue on Windows.
2024-09-09 10:24:41 +08:00
Jason Lee
821487bed5
Improve popup snap to window with margin. ( #225 )
...
- Also update GPUI.
Ref: https://github.com/zed-industries/zed/pull/17159
<img width="866" alt="image"
src="https://github.com/user-attachments/assets/0737e4e4-7069-4554-a766-b9fc7b487fd6 ">
2024-09-07 11:50:38 +08:00
Jason Lee
b6374313b2
Fix DockItem::tabs, the items should use trait object to support difference type.
2024-09-06 18:04:26 +08:00
Jason Lee
9baada4fb4
dock: Reduce dock item member ( #223 )
2024-09-06 17:51:21 +08:00
xda
83aecf1293
Add ButtonGroup ( #221 )
...
<img width="849" alt="image"
src="https://github.com/user-attachments/assets/5f809b40-9d4c-4934-828d-98f77a3f4b29 ">
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-09-06 10:32:10 +08:00
Jason Lee
adf6f70185
dock: Define a better way to init Dock layout. ( #218 )
2024-09-05 19:33:32 +08:00