Jason Lee
b1f4a4f642
tabs: Remove underline variant TabBar paddings. ( #1126 )
...
<img width="1167" height="1044" alt="image"
src="https://github.com/user-attachments/assets/0a2b34b7-5629-402b-a54a-f975aab77e78 "
/>
2025-08-08 19:06:26 +08:00
Jason Lee
85e2a72d03
slider: Add to support range to Slider. ( #1121 )
...
- Add to support Styled for Slider, and `bg`, `text_color`, `radius` can
change the slider bar and thumb.
## Break Changes
- The `reverse` method is removed from Slider, the Slider with vertical
now is always display from bottom to top.
<img width="1401" height="1176" alt="image"
src="https://github.com/user-attachments/assets/656592d6-ffac-4fd1-b569-848092c081bc "
/>
2025-08-08 16:59:23 +08:00
Jason Lee
900a4aa652
modal: Fix escape to dismiss Modal when list have selected item. ( #1124 )
2025-08-08 12:36:27 +08:00
Jason Lee
880d023834
virtual_list: Fix scroll to item not align to paddings. ( #1122 )
...
- Fixed List scroll to item at first time rendering.
2025-08-08 11:56:18 +08:00
Jason Lee
123a4a9fcd
chore: Update GPUI to fix click_count API changes. ( #1123 )
...
Closes #1116
2025-08-08 11:53:45 +08:00
Floyd Wang
0ab497ea1d
radio: Render the label based on its own size ( #1114 )
2025-08-06 15:29:07 +08:00
Jason Lee
9a040eaaac
list: Refactor List, Dropdown delegate API to support section. ( #1107 )
...
Ref UITableView API:
https://developer.apple.com/documentation/uikit/uitableviewdatasource
## Changes
- Added some section related API to `ListDelegeate` and
`DropdownDelegate` with default implement, so if you don't need section
that you can just keep the default.
- Added `sections_count` method to get the number of sections, default
is 1.
- Added `render_section_header` for special the section header by if
needed, default return None.
- Added `render_section_footer` for special the section footer by if
needed, default return None.
## Break Changes
- The `DropdownState` have change new method to use IndexPath type:
```diff
- DropdownState::new(vec![], Some(1), window, cx);
+ DropdownState::new(vec![], Some(IndexPath::new(1)), window, cx);
```
- The `ListDelegeate`, `DropdownDelegate` has changed API:
- The `ix` are change from `usize` to `IndexPath`.
```diff
- fn render_item(&self, ix: usize, window: &mut Window, cx: &mut
Context<List<Self>>) -> Option<Self::Item>
+ fn render_item(&self, ix: IndexPath, window: &mut Window, cx: &mut
Context<List<Self>>) -> Option<Self::Item>
- fn set_selected_index(&mut self, ix: Option<usize>, window: &mut
Window, cx: &mut Context<List<Self>>)
+ fn set_selected_index(&mut self, ix: Option<IndexPath>, window: &mut
Window, cx: &mut Context<List<Self>>)
```
- The `items_count` method have added `section` argument to support list
section.
```diff
- fn items_count(&self, cx: &App) -> usize
+ fn items_count(&self, section: usize, cx: &App) -> usize
```
- The `can_load_more` method has renamed to `is_eof` in `ListDelegate`
and `TableDelegate`.
```diff
- fn can_load_more(&self, cx: &App) -> bool
+ fn is_eof(&self, cx: &App) -> bool
```
- The `can_search` method has renamed to `searchable` in `ListDelegate`.
```diff
- fn can_search(&self) -> bool
+ fn searchable(&self) -> bool
```
## Showcase
<img width="1196" height="925" alt="image"
src="https://github.com/user-attachments/assets/22750abe-cc3f-427e-903b-51758bd4e027 "
/>
<img width="1214" height="934" alt="image"
src="https://github.com/user-attachments/assets/52d42546-e6e7-4448-9c0f-43cd659fb630 "
/>
---------
Co-authored-by: Floyd Wang <gassnake999@gmail.com>
2025-08-05 19:23:32 +08:00
Floyd Wang
16f4fc0456
drawer: Fix the overlay_closable not working ( #1113 )
2025-08-05 19:10:38 +08:00
ihavecoke
163b540681
tiles: Add panels method. ( #1112 )
2025-08-04 19:33:28 +08:00
Jason Lee
fe8a1e8e9f
scrollbar: Show scrollbar immediately when scroll offset changed. ( #1111 )
...
https://github.com/user-attachments/assets/823f3ac7-4335-4dae-a540-a2ccd11b8fc8
2025-08-04 17:00:20 +08:00
Floyd Wang
4b85cf6ad2
table: Fix the border overlap issue ( #1110 )
...
| Before | After |
| - | - |
| <img width="355" height="165" alt="SCR-20250801-kaof"
src="https://github.com/user-attachments/assets/ac073913-7813-43f2-a860-690a2366640b "
/> <img width="268" height="137" alt="SCR-20250801-kgqk"
src="https://github.com/user-attachments/assets/6a01df6d-fbf9-42a3-bfa3-4120a28b1401 "
/> | <img width="378" height="176" alt="SCR-20250801-kags"
src="https://github.com/user-attachments/assets/c5a3196d-4d0f-469b-b0d4-ce60b8dbe3f1 "
/> <img width="274" height="136" alt="SCR-20250801-kgik"
src="https://github.com/user-attachments/assets/649ff866-f153-40f3-97fa-7715f7480a2f "
/> |
2025-08-01 11:42:58 +08:00
Jason Lee
6c7a28c818
kbd: Fix Kdb to support display - key. ( #1109 )
2025-07-31 20:39:19 +08:00
Jason Lee
efa2c7c9ef
virtual_list: Add VirtualListScrollHandle to support scroll_to_item. ( #1108 )
...
- Also fixed Table scroll to selected column support.
https://github.com/user-attachments/assets/3b7c51a7-addf-4657-9f9f-de9047fffab8
2025-07-31 18:09:23 +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
b2ce262da9
chore: Fix release unused method warning.
2025-07-30 15:44:41 +08:00
Jason Lee
e2153c9198
dock: Hide panel toolbar when dock is collapsed. ( #1105 )
2025-07-30 15:38:14 +08:00
Cyandev
b8db00dd3c
scrollbar: Reduce unnecessary frame updates ( #1104 )
...
The current scrollbar implementation calls
`Window::request_animation_frame` during the delay phase, which causes
unnecessary CPU usage. This PR updates the scrollbar to use a timer to
wait before starting the fade-out animation, allowing the CPU to remain
idle during this phase.
There is the comparison with Instruments.
**Before:**
<img width="632" height="75" alt="image"
src="https://github.com/user-attachments/assets/b407f1e5-8337-4f8f-b308-2cc16f6bf7ba "
/>
**After:**
<img width="608" height="75" alt="image"
src="https://github.com/user-attachments/assets/965787cf-1a42-413a-9a5e-ad0910c5cbee "
/>
2025-07-30 09:55:24 +08:00
Jason Lee
518004a014
input: Fix to let set_value works when Input is disabled. ( #1103 )
2025-07-29 17:55:53 +08:00
obito
7487662343
chrore: Refactor the disabled API for NumberInput, DatePicker, OtpInput, Calandar. ( #1102 )
...
- Added `disabled` method to OtpInput.
- Added `disabled` method to DatePicker.
- Added `disabled_matcher` method to CalendarState.
## Break Changes
- The `InputState` has been removed `disabled` and `set_disabled`
method, the disabled state should assign from TextInput element.
```diff
- let state = InputState::new("input1").disabled(true)
+ let state = InputState::new("input1");
+ TextInput::new(&state).disabled(true)
```
- Renamed `set_disabled` method to `set_disabled_matcher` from
`CalendarState`.
- Removed `set_disabled` method from `DatePickerState`, use
`disabled_matcher` method in `DatePicker` element.
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-07-29 17:31:52 +08:00
Floyd Wang
c07bc4aaad
list: Add support for scrolling to item with the given strategy ( #1100 )
...
## Breaking Change
- Add `strategy` to the `scroll_to_item` method.
```diff
+ list.scroll_to_item(selected, ScrollStrategy::Center, window, cx);
- list.scroll_to_item(selected, window, cx);
```
2025-07-29 15:14:26 +08:00
Jason Lee
771fd78416
tabs: Fix tab_bar_segmented default fallback color to secondary. ( #1101 )
2025-07-29 14:42:46 +08:00
Jason Lee
f423b8ffa2
table: Fix table head size. ( #1099 )
...
Close #1098 , this issue was included from #1094
2025-07-29 10:03:25 +08:00
Jason Lee
058dd27687
tab: Fix tab text vertical center in small, xsmall size. ( #1097 )
2025-07-28 19:33:04 +08:00
Jason Lee
461ed9c173
chore: Fix Slider, Progress width in horizontal mode. ( #1096 )
...
This bug included since Taffy 0.8 update in
[#taffy](https://github.com/zed-industries/zed/pull/34939 )
2025-07-28 18:56:09 +08:00
Jason Lee
93b578294c
list: Update ListItem and DropdownListItem style. ( #1095 )
...
## Break Change
- The `Selectable` trait has been removed `element_id` method, this is
necessary.
- The `item` of `List` now must impl `Selectable` trait.
## List
> NOTE: The default ListItem is no rounded and paddings.
<img width="1144" height="762" alt="image"
src="https://github.com/user-attachments/assets/32348682-f89a-487a-af9f-5ed379a7f2d8 "
/>
## Dropdown
<img width="537" height="387" alt="image"
src="https://github.com/user-attachments/assets/3cc99d9f-3714-4d10-b467-6c91917bcbf0 "
/>
2025-07-28 18:38:39 +08:00
Floyd Wang
6d0443998c
table: Fix the incorrect rendering of the header border ( #1094 )
2025-07-28 10:32:11 +08:00
Jason Lee
37aa26d655
check, radio: Add fade in animation to Checkbox and Radio. ( #1092 )
2025-07-24 11:41:34 +00:00
Jason Lee
479ab8f0d6
switch: Apply use_keyed_state to store toggle state for animation. ( #1091 )
...
Ref https://github.com/zed-industries/zed/pull/34741
Now `Switch` can use impl RenderOnce.
2025-07-24 19:22:55 +08:00
Jason Lee
579c7a3cbb
virtual_list: Fix scrollable size calculate in VirtualList. ( #1087 )
...
The `virtual_list` scroll range issue because recently GPUI changed the
`ScrollHandle` API, now we only get the `max_offset`.
So #1086 have fixed this to implementation a `content_size` method to
calculate `max_offset` and `bounds` of the `ScrollHandle`.
But I found that the `Interactivity` prepaint (This is used in
VirtualList) was not to update the `bounds` of the `ScrollHandle`.
Wait https://github.com/zed-industries/zed/pull/35013 to merge.
| Before | After |
| -- | --- |
| <img width="620" alt="image"
src="https://github.com/user-attachments/assets/6ffb8f30-93b4-42ec-a837-90f80ecb2bf5 "
/> | <img width="620" alt="image"
src="https://github.com/user-attachments/assets/21466332-030c-495f-8c84-e3a2c6eeb403 "
/> |
- Split `Scrollbale` and `VirtualList` story.
## Break Changes
- The `content_size` argument has been removed from `virtual_list`
callback.
2025-07-24 08:30:42 +00:00
Jason Lee
56cf05b749
table: Fix horizontal scroll range when no fixed columns. ( #1089 )
2025-07-24 15:35:14 +08:00
Floyd Wang
634ab14306
button: Use muted foreground as disabled text color ( #1088 )
2025-07-24 14:19:10 +08:00
Cyandev
e9d8741835
scrollbar: Fix content size ( #1086 )
...
Caused by PR #1078 incorrect changes, and GPUI was changed API
https://github.com/zed-industries/zed/pull/34832
The content size of the scrollable area should be its max scroll offset
plus the container size.
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-07-24 10:20:04 +08:00
Jason Lee
fcf447d612
theme: Fix scrollbar default color and list hover color. ( #1085 )
2025-07-23 11:50:42 +00:00
Floyd Wang
6d28cce719
notification: Fix display issues caused by the taffy upgrade ( #1084 )
2025-07-23 19:12:13 +08:00
Jason Lee
f458cb83f8
accordion: Fix accordion to size full. ( #1083 )
...
- Remove `accordion.background` color from themes.
2025-07-23 10:45:02 +00:00
Floyd Wang
a2b91a7a2b
input(state): Provide context to the validate method ( #1082 )
2025-07-23 14:30:16 +08:00
Jason Lee
271116926c
code-editor: Add go_to_line method to CodeEditor. ( #1081 )
...
- Fix to emit `enter` press key in Input single-line mode.
2025-07-23 13:33:09 +08:00
Cyandev
dfbda3999a
modal: Refine enter animation ( #1080 )
...
This PR adds a fade in animation for modals, which makes the UI looks
smoother.
https://github.com/user-attachments/assets/7671aa78-a3bd-43a6-ace7-d051d24f2523
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-07-23 10:29:42 +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
61b7e54bfa
table: Refactor the Table API for describe the columns. ( #1072 )
...
## Break Changes
- The `ColFixed` has renamed to `ColumnFixed`.
- The `ColSort` has renamed to `ColumnSort`.
### TableDelegate
- Removed `col_name`, `col_resizable`, `col_selectable`, `col_width`,
`col_sort`, `col_fixed`, `col_paddings`, `col_movable` method, now use
`col` method to return a TableCol for describe of them.
- The `cols_count` method renamed to `columns_count`.
```diff
- fn cols_count(&self, _: &App) -> usize
+ fn columns_count(&self, _: &App) -> usize
```
- The `move_col` has renamed to `move_column`.
- The `visible_cols_changed` has renamed to `visible_columns_changed`.
### TableEvent
```diff
- TableEvent::SelectCol
+ TableEvent::SelectColumn
- TableEvent::MoveCol
+ TableEvent::MoveColumn
- TableEvent::ColWidthsChanged
+ TableEvent::ColumnWidthsChanged
```
2025-07-21 11:16:35 +08:00
Floyd Wang
b7f443b73f
label: Streamline the test cases ( #1074 )
2025-07-18 17:10:36 +08:00
Floyd Wang
b553ca8dcc
label: Add support for highlighting specified text ( #1073 )
...
<img width="1712" height="1312" alt="SCR-20250718-ogsp"
src="https://github.com/user-attachments/assets/5f0043ef-77c7-4d91-ad99-4061b14497ff "
/>
<img width="1712" height="1312" alt="SCR-20250718-oguh"
src="https://github.com/user-attachments/assets/ed0bf114-37d0-458d-9321-82766fe75076 "
/>
2025-07-18 16:33:36 +08:00
Jason Lee
7f3f2a3940
button: Fix selected style for outline button. ( #1070 )
2025-07-17 14:20:19 +08:00
Jason Lee
9c782796c2
theme: Improve theme color fallbacks based on base colors. ( #1069 )
...
- Added a lot of default fallbacks for theme colors based on `base`
colors.
- Added `hue`, `saturation`, `lightness` method to change Hsla color.
- Update stories to use theme colors, not a direct color.
- Improve `Badge`, `Avatar` to use theme colors.
- Added a new theme: `Fahrenheit`.
2025-07-17 11:43:40 +08:00
Jason Lee
977ce5df29
theme: Refactor Theme config to support JSONSchama. ( #1068 )
2025-07-16 19:22:09 +08:00
Jason Lee
ed75659765
table: Update to standardization the TableDelegate API. ( #1067 )
...
## Break Changes
- Renamed some method name of the TableDelegate.
```diff
- fn can_select_col
+ fn col_selectable
- fn can_resize_col
+ fn col_resizable
- fn col_padding
+ fn col_paddings
- fn can_move_col
+ fn col_movable
```
- Removed `fn can_loop_select` remove TableDelegate, instead of to use
`loop_selection` option on `Table`.
2025-07-16 17:11:49 +08:00
Jason Lee
ea1f5331c8
input: Hide cursor and selection when window is deactivated. ( #1066 )
2025-07-16 14:01:46 +08:00
Jason Lee
eca7949583
input: Update input behaviors to do not unselect on blur or press escape. ( #1065 )
...
- Also to pub `unselect` for manually use, and fix this method will
incorrect to move right 1 char.
2025-07-16 13:29:58 +08:00
Jason Lee
0fbe32c7d7
highlighter: Fix to support custom language register. ( #1064 )
2025-07-15 19:24:25 +08:00
Jason Lee
ac026e26c9
theme: Improve theme color fallbacks and add more themes. ( #1063 )
2025-07-15 18:33:36 +08:00
Jason Lee
d139198c15
theme: Impl Default for Theme. ( #1061 )
2025-07-15 16:35:12 +08:00
Jason Lee
c9b5993472
story: Improve story case style. ( #1060 )
2025-07-15 11:56:07 +08:00
Jason Lee
cfd1551575
theme: Add more theme and fix to use default color from base color. ( #1058 )
2025-07-14 20:17:11 +08:00
Jason Lee
6508927e7f
input: Add appearance option to NumberInput, Dropdown, DatePicker to render without style. ( #1054 )
...
<img width="1100" height="935" alt="image"
src="https://github.com/user-attachments/assets/b213c778-eef0-4d63-8d07-b68da9a078b1 "
/>
2025-07-14 19:57:56 +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
44427afacb
theme: Add to support highlight color to theme config. ( #1055 )
...
<img width="1058" height="1026" alt="image"
src="https://github.com/user-attachments/assets/300fb16b-c5e4-4eef-9690-54fcabc4fe47 "
/>
<img width="836" height="855" alt="image"
src="https://github.com/user-attachments/assets/3fdc8301-375d-4223-a2ea-8d4f411a90bd "
/>
2025-07-14 17:04:18 +08:00
Jason Lee
82b87d92ab
text_view: Fix nested Blockquote render in Markdown and HTML. ( #1053 )
...
<img width="986" height="271" alt="image"
src="https://github.com/user-attachments/assets/1de04629-2bdc-48f2-ae69-45c33482aeff "
/>
- Also fixed short language name in code block, e.g.: `rs` -> `rust`.
2025-07-14 14:30:40 +08:00
Floyd Wang
3b759cd448
plot: Use f32 instead of f64 ( #1052 )
...
## Break Change
- Convert all `f64` parameters to `f32`.
Since the GPUI geometry module uses f32 for rendering, we are also
switching to f32. This helps avoid many as operators and unnecessary
conversions.
2025-07-08 16:24:59 +08:00
Jason Lee
8bf66443b2
theme: Add theme schema to support JSON theme config. ( #1050 )
2025-07-07 19:40:00 +08:00
Jason Lee
40a2467374
virtual_list: Add element state to cache item size calculate. ( #1048 )
2025-07-07 11:47:35 +08:00
Jason Lee
4156c831c6
chore: Refactor code for Input. ( #1046 )
2025-07-05 14:37:12 +08:00
Jason Lee
89ee8c0630
otp_input: Fix to keep showing focus border when all code has filled. ( #1047 )
...
https://github.com/user-attachments/assets/dd10793e-668e-4c01-9bc9-fe00b539a5d1
2025-07-05 14:12:20 +08:00
Jason Lee
9b0ce145f6
alert: Improve Alert styles. ( #1044 )
...
<img width="1201" alt="image"
src="https://github.com/user-attachments/assets/7484132b-8bdd-4353-a6f0-f038189d9b15 "
/>
2025-07-04 15:29:05 +08:00
Jason Lee
cafb03777b
chore: Remove shadow_xs, now GPUI has this method. ( #1043 )
...
https://github.com/zed-industries/zed/pull/33361
2025-07-04 15:17:55 +08:00
Jason Lee
1a4b7ce76a
highlighter: Fix some case update will get incorrect syntax highlight. ( #1041 )
2025-07-04 12:46:59 +08:00
Jason Lee
1069469c46
theme: Update secondary color and fix toggle selected color. ( #1039 )
...
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/9ec4f4ea-f318-4db6-b9cd-7911cc4f9462 "
/>
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/85d52c62-1e51-49d3-905e-30865555cfd8 "
/>
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/eb71f364-730d-4f55-a84d-95235a3545f0 "
/>
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/3383e8f7-500d-4348-b391-c764a35fd6a9 "
/>
2025-07-03 19:23:40 +08:00
Jason Lee
4075447c63
text_view: Fix list item to merge inline paragraphs, and fix paragraphs margin. ( #1036 )
...
## Before
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/579385e6-a206-45e4-80a1-e1e2cdd6b164 "
/>
## After
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/2f551d22-5662-4c3c-a0e5-5ce9f26e1e66 "
/>
2025-07-03 18:02:08 +08:00
Jason Lee
9eb7e10a1d
button: Adjust outline button active color. ( #1035 )
2025-07-03 15:35:19 +08:00
Floyd Wang
f4025a9447
form: Fix label text wrapping issue ( #1034 )
...
| Before | After |
| - | - |
| <img width="752" alt="image"
src="https://github.com/user-attachments/assets/32abd11a-39c6-4045-9727-3188c46e482c "
/> | <img width="752" alt="image"
src="https://github.com/user-attachments/assets/98e45484-1c05-4d90-977f-efd9b89d9dd9 "
/> |
2025-07-03 15:09:57 +08:00
Floyd Wang
32d0beff22
plot: Tooltip support multiple dots ( #1030 )
2025-07-03 11:28:48 +08:00
Jason Lee
b80d3a95b1
badge: Add icon variant to Badge. ( #1029 )
...
<img width="1248" alt="image"
src="https://github.com/user-attachments/assets/5d80a3d9-4d4e-4eea-89c9-cea9ab33be9e "
/>
2025-07-03 11:13:39 +08:00
Jason Lee
66a9b3e9df
avatar: Add Avatar element. ( #1028 )
...
<img width="1384" alt="image"
src="https://github.com/user-attachments/assets/1e66aa8c-0c87-4d8d-abb7-38e5f616fe3e "
/>
<img width="1384" alt="image"
src="https://github.com/user-attachments/assets/bd32b6e0-aa0f-4d01-af9f-4bfaea1a3718 "
/>
2025-07-02 18:58:06 +08:00
Jason Lee
a28ad0b1f1
text_view: Fix list item text wrap. ( #1027 )
...
## Before
<img width="911" alt="image"
src="https://github.com/user-attachments/assets/cfe01686-48da-4140-84d0-ead361833131 "
/>
## After
<img width="902" alt="image"
src="https://github.com/user-attachments/assets/fb97f8e8-3f16-43c4-8223-b7c6fdcc269f "
/>
2025-07-02 15:25:58 +08:00
Jason Lee
41663ca030
chore: Update GPUI and fix FocusableWrapper removed error. ( #1026 )
...
Close #1024
Ref https://github.com/zed-industries/zed/pull/32436
2025-07-02 11:06:04 +08:00
Jason Lee
646b8b7206
button: Fix loading style when disabled. ( #1021 )
...
## Before
<img width="1193" alt="image"
src="https://github.com/user-attachments/assets/e7a82f21-2ec8-42fa-8daa-05d4f086e0b2 "
/>
## After
<img width="1196" alt="image"
src="https://github.com/user-attachments/assets/f387c591-a4a1-4220-9318-badfb8a133e6 "
/>
2025-06-30 15:44:26 +08:00
Jason Lee
21dbaffcf4
input: Add Cursor and Selection type and export line number, cursor. ( #1012 )
2025-06-27 20:48:26 +08:00
Jason Lee
5b17281374
text_view: Fix li > strong render not in same line. ( #1016 )
...
## Before
<img width="1294" alt="image"
src="https://github.com/user-attachments/assets/0620f33a-914e-4d2a-8832-16c037351352 "
/>
## After
<img width="1131" alt="image"
src="https://github.com/user-attachments/assets/a31b9b5a-6d41-4c04-a415-ff97e7cd1f31 "
/>
2025-06-27 18:41:28 +08:00
Jason Lee
b18a3ff7a9
menu: Fix menu item hover to use accent color. ( #1015 )
2025-06-26 18:38:36 +08:00
Jason Lee
babb04fcaa
text_view: Fix code block background to use accent color. ( #1014 )
2025-06-26 18:30:34 +08:00
Jason Lee
819161ec58
form: Fix form label required not in same line. ( #1013 )
...

2025-06-25 22:30:09 +08:00
Floyd Wang
f7d536531d
dropdown_button: Fix incorrect rounded when ghost button selected ( #1011 )
...
| Before | After |
| - | - |
| <img width="218" alt="SCR-20250625-psed"
src="https://github.com/user-attachments/assets/873db4e9-d169-4273-bee9-58332b41c00f "
/> | <img width="222" alt="SCR-20250625-prxz"
src="https://github.com/user-attachments/assets/48f8cb35-cd67-47ac-bbb9-2739e1aa16b9 "
/> |
2025-06-25 18:11:30 +08:00
Jason Lee
692ee83b61
chore: Move shadow_xs to StyledExt trait. ( #1010 )
...
This PR for fix https://github.com/longbridge/gpui-component/pull/1009
mistake.
2025-06-25 16:54:48 +08:00
Jason Lee
c8481bee19
theme: Update theme details to match Shadcn. ( #1009 )
...
## Light
<img width="1393" alt="image"
src="https://github.com/user-attachments/assets/b1893648-5994-4c08-a79a-30b10dc62c47 "
/>
<img width="1393" alt="image"
src="https://github.com/user-attachments/assets/de5b4e13-7889-473b-b0c0-9ac11de0a4b0 "
/>
<img width="1393" alt="image"
src="https://github.com/user-attachments/assets/9f17c2a1-3a71-4d56-be6c-49f26f5e7406 "
/>
<img width="1393" alt="image"
src="https://github.com/user-attachments/assets/a4e99a61-a618-4c3b-a237-93bbc17d4cae "
/>
<img width="1393" alt="image"
src="https://github.com/user-attachments/assets/64313ae5-8284-46ff-a75f-5a14a1e3b339 "
/>
<img width="1193" alt="image"
src="https://github.com/user-attachments/assets/5c134172-0ab6-4299-950d-bac3dda7b61d "
/>
<img width="1374" alt="image"
src="https://github.com/user-attachments/assets/c8816288-d008-490d-9db3-4fa796278001 "
/>
<img width="1428" alt="image"
src="https://github.com/user-attachments/assets/d903a854-15e3-48aa-8ebd-969c1c91c624 "
/>
## Dark
<img width="1467" alt="image"
src="https://github.com/user-attachments/assets/720418b4-8a9b-42c9-814b-a0be660e8eba "
/>
<img width="1393" alt="image"
src="https://github.com/user-attachments/assets/4ca20f31-c998-40bb-b4bf-6079c506f9ec "
/>
<img width="1393" alt="image"
src="https://github.com/user-attachments/assets/ae828624-55b3-4d33-8a20-2c71a0a838cc "
/>
<img width="1393" alt="image"
src="https://github.com/user-attachments/assets/7014c76c-5e18-4cd5-9cf1-6bccbb58e56a "
/>
<img width="1393" alt="image"
src="https://github.com/user-attachments/assets/6e1c514d-5f76-460a-9c7e-a38f2f0e712a "
/>
<img width="1374" alt="image"
src="https://github.com/user-attachments/assets/07ad8c20-317b-4209-9f92-b500f53dd4c0 "
/>
<img width="1428" alt="image"
src="https://github.com/user-attachments/assets/6bd2969d-9bec-4ed7-9280-109a81144dfa "
/>
2025-06-25 16:40:27 +08:00
Jason Lee
67f0ffbc9c
chore: Upgrade GPUI and fix action API changes. ( #1008 )
...
Ref https://github.com/zed-industries/zed/pull/33263
2025-06-25 11:06:12 +08:00
Jason Lee
ed0887420f
chore: Impl Styled for more elements. ( #1007 )
...
This PR for continuing #1005 was missed commits.
2025-06-24 19:36:42 +08:00
Jason Lee
dfa3c9a29e
menu: Fix sub menu gap. ( #1006 )
...
<img width="334" alt="image"
src="https://github.com/user-attachments/assets/1f1a9515-f52d-4171-9e53-56d18f923be0 "
/>
2025-06-24 19:33:22 +08:00
Jason Lee
9aa593ce0b
chore: Apply Styled to elements to support flexable style refinement. ( #1005 )
...
## Break Changes
- date_picker, dropdown: Removed `width` method, use `w`, `w_full`
instead.
```diff
- .width(px(100.))
+ .w(px(100.))
```
- calendar: Removed `bordered` method, use `border` method from GPUI
instead.
```diff
- .bordered(false)
+ .border_0()
```
2025-06-24 18:56:35 +08:00
Jason Lee
c05d63dfbe
accordion: Improve Accordion style, and remove item gap when no border. ( #1004 )
...
<img width="635" alt="image"
src="https://github.com/user-attachments/assets/a18aaa73-9cca-4adb-bee9-8cac2178bda0 "
/>
<img width="650" alt="image"
src="https://github.com/user-attachments/assets/02b10d8c-47a3-4226-9585-d1d970679dde "
/>
2025-06-24 17:46:55 +08:00
Jason Lee
21c8844377
notification: Improve Notification animation. ( #1003 )
2025-06-24 17:25:55 +08:00
ihavecoke
cf24614bd2
title_bar: Add macOS double-click functionality to title bar ( #996 ) ( #1002 )
2025-06-24 07:45:28 +08:00
Jason Lee
3a6741f990
input: Fix wrap text not draw in multi-line mode. ( #998 )
...
Close #997
https://github.com/user-attachments/assets/6ad9f431-b5a2-42f1-93e6-6425f0851898
2025-06-23 18:14:29 +08:00
Jason Lee
7360d2834d
theme: Update default radius to 6px, and modal to 8px. ( #995 )
2025-06-20 20:07:19 +08:00
Jason Lee
fdeb46b293
modal: Update modal inner padding from p_4 to p_6.
2025-06-20 18:16:35 +08:00
Jason Lee
35623f47d7
menu: Fix MenuItem Separator to use border color. ( #993 )
2025-06-20 15:08:21 +08:00
Jason Lee
b5922f9d92
dropdown_button: Keep rounded when is a ghost variant. ( #992 )
...
<img width="159" alt="image"
src="https://github.com/user-attachments/assets/fcb08439-34fc-42f6-bbf4-ca0efbca8e89 "
/>
2025-06-19 22:45:16 +08:00
Michael Angerman
389c25c287
chore: Fix spelling of the word masked ( #990 )
2025-06-19 12:34:19 +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
Jason Lee
4c87c72f60
menu: Fix scrollbar can't drag to bottom of scrollable PopupMenu. ( #984 )
...
| Before | After |
|--| -- |
| <img width="166" alt="image"
src="https://github.com/user-attachments/assets/883eb78b-9ea3-4f1b-b01e-81fbbbdd39ed "
/> | <img width="166" alt="image"
src="https://github.com/user-attachments/assets/9ba551aa-5d9e-49ed-adfa-3da6c654f0c4 "
/>|
Ref #979 but not fix.
2025-06-18 17:31:56 +08:00
Jason Lee
1752d3e2b4
chore: Improve Scrollbar and Scrollable to support Axis and ScrollbarAxis. ( #983 )
2025-06-18 16:00:35 +08:00
Floyd Wang
c5fed17941
notification: Better style details ( #982 )
...
| Before | After |
| - | - |
| <img width="752" alt="Before"
src="https://github.com/user-attachments/assets/d4e08e87-100a-4b8d-90f3-909900d41e66 "
/> | <img width="752" alt="After"
src="https://github.com/user-attachments/assets/e84c145e-8990-4c47-bbff-0d4e86acca64 "
/> |
2025-06-18 14:21:25 +08:00
Jason Lee
da0063cb57
list: Fix search input padding. ( #981 )
...
This change to fix #965 affected search input size.
<img width="513" alt="image"
src="https://github.com/user-attachments/assets/f8fce042-2f53-4dc3-a725-64a1b0ed6630 "
/>
<img width="550" alt="image"
src="https://github.com/user-attachments/assets/048e9ef8-da2d-4b9b-ad24-ccda55695c8b "
/>
<img width="517" alt="image"
src="https://github.com/user-attachments/assets/f06f7e9a-bf30-4e01-a0aa-0a1db6b2c6e1 "
/>
2025-06-18 14:07:21 +08:00
Floyd Wang
1055131ffe
notification: Support remove notification with the given id ( #980 )
2025-06-18 14:02:07 +08:00
Floyd Wang
fe342919e6
notification: Show the close button when auto-hide is enabled ( #977 )
2025-06-18 11:34:11 +08:00
Jason Lee
a478f000d4
input: Add MovePageUp, MovePageDown keymap to multi-line mode. ( #969 )
2025-06-17 20:57:53 +08:00
Jason Lee
64e3653bc9
modal: Add scrollbar to modal again. ( #971 )
2025-06-17 18:49:49 +08:00
Jason Lee
0e3b61a704
Revert "modal: Add scrollbar to Modal for overflow contents. #960 " ( #970 )
2025-06-17 17:48:42 +08:00
Jason Lee
edf9ed7e5f
input: Fix move up/down to keep same column. ( #968 )
...
Close #908
https://github.com/user-attachments/assets/f050dd1a-501c-4784-a45b-78ba77cdf19c
2025-06-17 15:23:37 +08:00
Jason Lee
3d7f1f8a73
input: Keep showing the blink cursor when typing or moving. ( #967 )
...
https://github.com/user-attachments/assets/3b7d2cfd-50b0-4744-bb74-1deafc5710e3
2025-06-17 14:20:27 +08:00
Jason Lee
869d48b446
input: Fix Input cursor x position when scrolled. ( #966 )
...
https://github.com/user-attachments/assets/db76d3a3-ecd6-45c6-8377-0afa4746f2db
2025-06-17 14:14:23 +08:00
Jason Lee
de491a790c
input: Fix Input prefix, suffix position, and mask * in vertical center. ( #965 )
...
- Fix Input, NumberInput padding x with prefix, suffix.
- Fix Input mask char to render in vertical center.
<img width="498" alt="image"
src="https://github.com/user-attachments/assets/f7b34e17-2503-4a24-9e16-3a30b48bacb5 "
/>
- Fix to only use `Tab`, `Shift-Tab` to indent in multi-line mode.
- Improve blink cursor to render with 1.5px width and same as
line-height.
2025-06-17 13:59:02 +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
60bebaf51f
markdown: Fix Todo list item checkbox style. ( #962 )
...
<img width="394" alt="image"
src="https://github.com/user-attachments/assets/dee22c50-4110-46e3-9205-320809c2ef00 "
/>
2025-06-17 10:50:57 +08:00
Jason Lee
d2633faf82
modal: Add scrollbar to Modal for overflow contents. ( #960 )
...
- Add `overlay` variable to Theme.
<img width="536" alt="image"
src="https://github.com/user-attachments/assets/12ed43c8-00b5-41b1-8cf6-0f31b533525c "
/>
2025-06-16 17:35:02 +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
Victor Quiroz
769c0990a4
number_input: Allow signed numbers ( #957 )
...
Allow negative numbers and explicit positive numbers.
Added these tests:
1. Only one sign at the start of the number.
2. No signs in the middle of the number.
3. No signs in the fractional part.
4. Sign doesn't break formatting.
https://github.com/user-attachments/assets/89c4f4c7-d3bf-4cc1-aeca-7e9bedd02e20
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-06-16 10:05:37 +08:00
Floyd Wang
aaa855053f
list: Add a default style for empty data ( #955 )
...
<img width="890" alt="image"
src="https://github.com/user-attachments/assets/68339cab-023f-42bc-93cc-0cded1b690b0 "
/>
2025-06-13 15:44:00 +08:00
Jason Lee
89c210c4ca
highlighter: Avoid crash when language not registered. ( #954 )
...
Close #952
Fallback to use plain text to display.
2025-06-12 19:45:29 +08:00
Jason Lee
1032881103
markdown: Add debounce 500ms to update markdown to avoid render slow. ( #953 )
...
Ref #933
2025-06-12 19:15:23 +08:00
Jason Lee
e29b51cc83
popover: Improve PopoverContent to support styled methods. ( #951 )
...
- Add `refine_style` method to `StyledExt`.
- Also improve the Popover example style.
<img width="1053" alt="image"
src="https://github.com/user-attachments/assets/bf435a79-6c34-41ab-802a-29a7600ecd29 "
/>
2025-06-12 15:00:00 +08:00
Jason Lee
d61b0d2510
highlighter: Fix highlight offset and reset highlight when replace all text. ( #950 )
...
- Improve JSON highlights.
<img width="839" alt="image"
src="https://github.com/user-attachments/assets/3f28ae1c-9f07-4df4-a477-f875a26d4c7d "
/>
2025-06-12 14:11:01 +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
ed6adc2dae
input: Simplify newline logic for multi-line text and fix auto-grow lines count. ( #948 )
...
- Fix to only keep indent in CodeEditor mode.
https://github.com/user-attachments/assets/4b926a18-b0b5-4419-97dd-21778cd20fb3
2025-06-12 10:59:41 +08:00
Jason Lee
6ea427549a
input: Add focus_bordered method to toggle Input focus border. ( #946 )
2025-06-11 21:34:37 +08:00
Jason Lee
a3a4f1942d
chart: Update Chart story by use JSON file data. ( #947 )
2025-06-11 21:34:22 +08:00
enpitsulin
1214798abd
chore: Update GPUI and fix uniform_list API changes. ( #945 )
...
close #943
I am not sure about title specification of PR. pls feel free to edit.
2025-06-11 17:48:04 +08:00
Jason Lee
f82c347e37
title_bar: Fix pl to override default TitleBar left padding. ( #944 )
2025-06-11 16:52:51 +08:00
Jason Lee
a7505487e1
highlighter: Fix Zig language highlight. ( #942 )
...
<img width="1143" alt="image"
src="https://github.com/user-attachments/assets/62f87eb4-1d16-4165-8504-803aadf1b0fe "
/>
2025-06-11 16:18:38 +08:00
Jason Lee
4c0e13bc8d
radio: Add id to RadioGroup to avoid clicks conflict. ( #941 )
...
## Break Changes
- The `RadioGroup` now require a `id` to init.
```diff
- RadioGroup::horizontal()
+ RadioGroup::horizontal("group-id-1")
- RadioGroup::vertical()
+ RadioGroup::vertical("group-id-2")
```
2025-06-11 15:45:24 +08:00
Jason Lee
79ff6ba9cc
highlighter: Fix injection language highlight. ( #931 )
...
Still have a bit bug for highlight:
<img width="1012" alt="image"
src="https://github.com/user-attachments/assets/7ec39c85-c20c-4231-8752-b2a7a80f5570 "
/>
2025-06-11 15:26:27 +08:00
Floyd Wang
c333fd7106
notification: Add support for rendering custom content ( #938 )
...
## Break Change
You no longer need to pass a message when creating a new notification.
Instead, use the `message` method.
```diff
- Notification::new("There was a problem with your request.");
+ Notification::new().message("There was a problem with your request.");
```
<img width="1023" alt="image"
src="https://github.com/user-attachments/assets/4b93f2bb-e130-45d6-974f-8b14efac58a4 "
/>
2025-06-10 12:06:02 +08:00
stayhydated
0aceb02302
dropdown: Replace specialized impl From Vec<SharedString> to Vec<T: DropdownItem + Clone> ( #935 )
...
Needed for a proc macro i plan to publish when ready
```rs
#[derive(Clone, DropdownItemFtl, EsFluent, EnumIter, EnumString)]
#[fluent(enumerable)]
pub enum PreferedLanguage {
English,
French,
Chinese,
}
#[derive(Clone, DropdownItemFtl, EsFluent, EnumIter, EnumString)]
#[fluent(enumerable)]
pub enum Country {
UnitedStates,
France,
China,
}
#[derive(GpuiForm)]
pub struct User {
#[gpui_form(component(input))]
pub username: Option<String>,
#[gpui_form(component(input))]
pub email: String,
#[gpui_form(component(number_input))]
pub age: Option<u32>,
#[gpui_form(component(number_input))]
pub balance: Decimal,
#[gpui_form(component(check_box))]
pub subscribe_newsletter: bool,
#[gpui_form(component(switch))]
pub enable_notifications: bool,
#[gpui_form(component(dropdown(searchable)))]
pub country: Option<Country>,
#[gpui_form(component(dropdown()))]
pub preferred_language: PreferedLanguage,
#[gpui_form(component(calendar))]
pub birth_date: chrono::NaiveDate,
#[gpui_form(component(date_picker))]
pub appointment_date: chrono::NaiveDate,
#[gpui_form(component(progress))]
pub completion_percentage: f32,
#[gpui_form(skip)]
pub skip_me: bool,
}
```
2025-06-10 10:08:42 +08:00
Jason Lee
a6b9c96a27
title_bar: Fix TitleBar drag area. ( #936 )
...
Ref https://github.com/zed-industries/zed/pull/30828 changed new GPUI
API for better details for TitleBar drag area.
2025-06-09 23:09:07 +08:00
Jason Lee
c5201e6de9
input: Revert #929 changed replace_text_in_range result an incorrect cursor pos. ( #930 )
2025-06-09 19:02:09 +08:00
Jason Lee
d648874860
input: Add cmd-], cmd-[ to indent, outdent text. ( #929 )
2025-06-09 18:31:14 +08:00
Jason Lee
6aab9d3345
code-editor: Show hover popover for diagnostics. ( #924 )
...
<img width="719" alt="image"
src="https://github.com/user-attachments/assets/75fa9737-09e1-4baa-b7ac-304e847005c8 "
/>
2025-06-09 16:16:15 +08:00
Jason Lee
c3ec1deb97
code-editor: Update CodeEditor to support external language. ( #928 )
...
Add [Navi](https://navi-lang.org ) language for example to external
language for CodeEditor.
<img width="864" alt="image"
src="https://github.com/user-attachments/assets/73afa56d-31bd-4867-a9f2-0a8cf790af0f "
/>
2025-06-09 14:27:33 +08:00
Floyd Wang
44ec74f1fb
chart: Draw dashed lines using gpui PathBuilder ( #927 )
...
https://github.com/zed-industries/zed/pull/31678
2025-06-09 11:55:32 +08:00
Ylin
01197769df
list: Improve the selection method to support more scenarios ( #925 )
2025-06-06 19:50:49 +08:00
Jason Lee
d598e58666
tag: Add rounded to Tag and support outline for all variants. ( #923 )
...
<img width="1316" alt="image"
src="https://github.com/user-attachments/assets/e06f672d-f311-4dc2-b62a-c1f5cbce6973 "
/>
2025-06-06 13:35:24 +08:00
Floyd Wang
936ee27a2c
input: Fix the panic issue in end_of_line ( #922 )
2025-06-06 10:07:11 +08:00
Jason Lee
74de042b60
popup_menu: Do not dismiss PopupMenu when clicked on a submenu item. ( #921 )
2025-06-06 09:25:04 +08:00
Jason Lee
a8f5ced4e6
code-editor: Add markers for display diagnostics to CodeEditor. ( #920 )
...
Ref:
https://microsoft.github.io/monaco-editor/typedoc/functions/editor.setModelMarkers.html


2025-06-05 23:04:01 +08:00
Floyd Wang
9afe0063a4
plot: Fix incorrect tooltip dot left position ( #919 )
2025-06-05 16:25:28 +08:00
Floyd Wang
ecfa6b8451
chart: Add decimal feature ( #918 )
2025-06-05 16:03:20 +08:00
Duane Bester
4477cca969
highlighter: Adding tree-sitter-sequel for SQL support. ( #917 )
...
📦 Adding dependency:
[tree-sitter-sequel](https://github.com/derekstride/tree-sitter-sql )
### Previews
<img width="1398" alt="Screenshot 2025-06-04 at 9 27 08 PM"
src="https://github.com/user-attachments/assets/4aee67be-6fb3-4c57-95be-20792639851a "
/>
<img width="1398" alt="Screenshot 2025-06-04 at 9 34 02 PM"
src="https://github.com/user-attachments/assets/730e148f-2bc9-481d-8eea-8110f7884e69 "
/>
2025-06-05 11:54:52 +08:00
Floyd Wang
516c8fada4
chart: Introduce chart ( #878 )
...
Add a new component called `plot`. It provides a low-level approach to
data analysis and visualization.
Chart is a collection of ready-to-use chart components built with
`plot`.
| Light | Dark |
| - | - |
| <img width="1712" alt="SCR-20250604-qhxb"
src="https://github.com/user-attachments/assets/bf7ce76e-ab7a-42c2-92e7-17cd135de66f "
/> | <img width="1712" alt="SCR-20250604-qhxr"
src="https://github.com/user-attachments/assets/dd3e44ea-bbb5-41a2-8cce-38b316d7d800 "
/> |
2025-06-04 19:22:11 +08:00
Jason Lee
c97cdd7b89
input: Fix line number width, when line number not enable. ( #916 )
2025-06-03 23:40:21 +08:00
Jason Lee
2b796c94e9
highlighter: Improve performance for large file. ( #911 )
...
Still need to improve.
This version can work smooth when the file lines are less than 5000
lines.
> cargo run --release on MacBook Pro, Apple M3 CPU
- Editing at 110 FPS+
- Display at 120 FPS.
<img width="977" alt="image"
src="https://github.com/user-attachments/assets/37958bcb-20d8-486b-8c50-2728d16f971b "
/>
2025-06-03 23:20:33 +08:00
Floyd Wang
dc1d516a30
button: Impl Selectable for the dropdown button ( #913 )
...
## Break Change
- Add `is_selected` to the `Selectable` trait; Returns true if the
element is selected.
2025-06-02 14:25:18 +08:00
Jason Lee
901312bc5a
chore: Switch gpui to depends on Zed official. ( #912 )
...
Now, GPUI have merged `window_handle` support for all platforms.
- https://github.com/zed-industries/zed/pull/24327
- https://github.com/zed-industries/zed/pull/24545
- https://github.com/zed-industries/zed/pull/28152
It's time to depends on Zed official main branch.
2025-06-02 10:05:45 +08:00
Jason Lee
a4aff404ce
highlighter: Use tree-sitter to highlight code. ( #904 )
...
<img width="1318" alt="image"
src="https://github.com/user-attachments/assets/4a8e7b93-a7e7-4648-b8da-c5a6e7ede4f9 "
/>
<img width="1318" alt="image"
src="https://github.com/user-attachments/assets/bfc35845-719f-4c97-bf50-087feb0f6775 "
/>
2025-05-29 19:54:52 +08:00
Floyd Wang
838ffe0a79
modal: Display overlay at the correct z-index ( #909 )
...
| Before | After |
| - | - |
| <img width="1712" alt="SCR-20250528-ksil"
src="https://github.com/user-attachments/assets/3725f142-0792-478a-ac7e-1a9c5604821a "
/> | <img width="1712" alt="SCR-20250528-krmi"
src="https://github.com/user-attachments/assets/b0fac5db-97b2-4ebd-83e2-94786950185c "
/> |
2025-05-28 11:57:23 +08:00
Floyd Wang
49f1ac511d
form: Add text wrapping support for label ( #907 )
2025-05-27 19:31:06 +08:00
Jason Lee
bad9506ebb
inspector: Fix Inspector on release build. ( #906 )
2025-05-27 18:51:57 +08:00
Jason Lee
372c78fac6
input: Fix enter newline position incorrect by #901 change. ( #905 )
2025-05-27 17:25:54 +08:00
Jason Lee
0389608f59
chore: Update GPUI and fix Edges type chagnes.
2025-05-27 09:54:13 +08:00
Jason Lee
9073818d4e
input: Fix outdent when selection first line is no indent. ( #903 )
...
## Before
https://github.com/user-attachments/assets/67f94a09-b01b-43e4-9809-2e876f53a7b7
## After
https://github.com/user-attachments/assets/0ff7fee8-cbbc-4f55-8877-96c7ad07d662
2025-05-26 22:46:26 +08:00
Jason Lee
5419600fcd
input: Fix Input may out of char boundary ( #901 )
...
```
byte index 3 is not a char boundary; it is inside '吧' (bytes 1..4) of `L吧2`: 0: <unknown>
```
2025-05-26 22:42:31 +08:00
Jason Lee
1cbbf6ef18
code-editor: Improve CodeEditor to has default themes. ( #900 )
2025-05-26 18:17:15 +08:00
Floyd Wang
ebe10e20c7
alert: Add support for text wrapping ( #899 )
...
<img width="935" alt="image"
src="https://github.com/user-attachments/assets/6eb10c67-5301-4414-af7f-9b4444b77fb6 "
/>
2025-05-26 17:09:12 +08:00
Jason Lee
0a9de15d79
input: Change InputState::disabled to as builder method. ( #898 )
...
## Break Changes
- The `disabled` method now is for builder method, and `is_disabled` for
get state.
```diff
- pub fn disabled(mut self) -> bool
+ pub fn is_disabled(&self) -> bool
+ pub fn disabled(mut self, disabled: bool) -> Self
```
2025-05-26 17:00:17 +08:00
Jason Lee
1c11b5fb55
inspector: Add Inspector. ( #897 )
...
<img width="1434" alt="image"
src="https://github.com/user-attachments/assets/f6ec2e1d-ff1c-4798-90fe-d29bef20fa9d "
/>
2025-05-26 16:44:11 +08:00
Floyd Wang
a1ad647527
number_input: Add support for prefix and suffix ( #896 )
...
<img width="1097" alt="image"
src="https://github.com/user-attachments/assets/b4c1fc69-88ad-4ecd-b1c8-1a5a92836e82 "
/>
2025-05-26 16:16:22 +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
c99e696cb1
code-editor: Update code highlight theme colors. ( #888 )
2025-05-25 10:21:37 +08:00
Jason Lee
f539817d9b
alert: Add banner mode and on_close to Alert. ( #893 )
...
## Break Changes
- The `Alert::new` method change to 2 args, first is `id`.
```diff
- fn new(message: impl Into<Text>) -> Self
+ fn new(id: impl Into<ElementId>, message: impl Into<Text>) -> Self
```
<img width="1120" alt="image"
src="https://github.com/user-attachments/assets/214df737-6129-4a53-8f3b-86e83bc8082b "
/>
2025-05-23 19:20:13 +08:00
Jason Lee
a1e2160083
menu: Fix sub-menu item height to match with other items. ( #892 )
2025-05-23 17:24:52 +08:00
Jason Lee
8dc9666214
input: Fix cursor and IME popup position when IME typing. ( #889 )
...
- Fix cursor position when IME typing.
- Fix selection range when canceled IME typing.
- Fix IME popup position to follow the cursor position.
- Fix IME text to render with underline style.
Close #55
<img width="1231" alt="image"
src="https://github.com/user-attachments/assets/c746703f-23de-4b3b-bd5b-210a8447eeba "
/>
2025-05-23 15:00:24 +08:00
Jason Lee
2c4a28a6da
code-editor: Add current line background. ( #887 )
...
https://github.com/user-attachments/assets/3ab6a1b5-648c-4431-91d2-7ebefee2f511
2025-05-22 23:03:53 +08:00
Jason Lee
2d6284694d
code-editor: Fix highlight offset on Windows. ( #886 )
...
Again, caused by need `split('\n')` not use `.lines()`.
2025-05-22 22:10:59 +08:00
Jason Lee
d0ccb6bf17
code-editor: Improve code highlight performance. ( #885 )
...
- Split code to lines to improve performance and cache hit rate, close
#881
- Update default code highlight theme to use `macOS Classic`.
<img width="1208" alt="image"
src="https://github.com/user-attachments/assets/511b442d-5960-493f-88cc-b8aceb68f77b "
/>
<img width="1208" alt="image"
src="https://github.com/user-attachments/assets/6e5b2728-384f-4b62-b069-268118dec9ab "
/>
2025-05-22 18:09:18 +08:00
Floyd Wang
244090ddc5
number_input: Remove InputEvent from NumberInputEvent ( #884 )
...
## Break Change
- Number input no longer emits `InputEvent`; you need an additional
subscription for `InputEvent`.
2025-05-22 14:38:43 +08:00
Jason Lee
119d348e4a
input: Fix indent, outdent to consider \r on Windows. ( #880 )
...
https://github.com/user-attachments/assets/c662c251-36e5-4a80-bad9-7438ba1b395c
2025-05-21 22:37:07 +08:00
Jason Lee
445b1e4e02
input: Fix click can not to position cursor on empty line on Windows. ( #875 )
...
Reverts longbridge/gpui-component#874
Ref https://github.com/zed-industries/zed/pull/31031
2025-05-21 10:01:53 +08:00
ZW
6a190da785
calendar: Support custom matcher ( #873 )
...
See #870
2025-05-20 21:07:17 +08:00
Jason Lee
5658db42c7
input: Add CodeEditor mode. ( #863 )
...
## TODO
- [x] Cache highlight result.
- [x] Add a `code-editor` example with more languages test.
- [x] Support setup font to Input (Base on window scope text style).
- [x] Line number
- [x] Change font size and font family.
- [x] Enter newline to keep indent.
- [x] Height with flex_1
- [x] Add to support press `up`, `down` to move cursor to start or end
of the selection, if there is selected.
- [x] Add `Tab`, `Shift-Tab` to indent or outdent for cursor and
selection.
- [x] Double click to select at least 1 char.
https://github.com/user-attachments/assets/af74862d-15a9-4802-b4b4-2aeb606227ec
2025-05-20 15:51:00 +08:00
Jason Lee
67dd658635
input: Fix selection rendering for empty lines. ( #868 )
...
<img width="491" alt="image"
src="https://github.com/user-attachments/assets/b24e4fbc-40e8-4570-b254-2974aa7735a7 "
/>
2025-05-19 20:32:46 +08:00
Jason Lee
b97abd6394
input: Fix auto-grow height. ( #865 )
...
Fix #864
Updated InputState API to split `single_line`, `multi_line` and
`auto_grow`.
The `InputState::new` for default single_line, and added `multi_line`
and `auto_grow` to change other mode.
### With no wrap
https://github.com/user-attachments/assets/22a8f0d6-e264-4f39-bb30-386a41975d2b
### With soft wrap
https://github.com/user-attachments/assets/b71f0fb1-5937-470b-a278-8b1de7cfd7d7
2025-05-19 19:26: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
3c85ccbe2a
number_input: Fix NumberInput appearance by #858 change. ( #860 )
2025-05-17 10:51:04 +08:00
Jason Lee
bc398adbf3
input: Refactor Input, Picker as stateless mode. ( #858 )
2025-05-16 23:41:26 +08:00
Ratazzi
f3d97bf8e2
chore: Unify icon parameter types in ListItem and Dropdown. ( #857 )
...
## Changes
This PR unifies icon parameter types in UI components:
- Changed `ListItem.check_icon` parameter type from `IconName` to `impl
Into<Icon>`
- Changed `Dropdown.icon` parameter type from `impl Into<IconName>` to
`impl Into<Icon>`
- Updated related rendering logic
## Impact
- **API Consistency**: All components now accept the same icon parameter
type
- **Backward Compatible**: Existing code using `IconName` continues to
work
- **Enhanced Flexibility**: Components can now accept custom `Icon`
instances directly
2025-05-15 16:13:30 +08:00
Jason Lee
c0e0d82594
input: Add mask pattern to format display. ( #854 )
...
- Add `mask_pattern` to Input, NumberInput.
- Fix Input `set_text` to move cursor to end.
https://github.com/user-attachments/assets/2d7e362a-3f80-47a4-94e3-efd729bffcac
2025-05-14 22:27:46 +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
Jason Lee
e530af9b51
notification: Add action button to Notification. ( #832 )
...
- Fix `Icon` clone to keep text_color and other attributes.
<img width="1303" alt="image"
src="https://github.com/user-attachments/assets/abb35045-166e-450e-a200-1d4a1d2b6dd8 "
/>
2025-05-06 16:58:07 +08:00
Jason Lee
9906a482ec
style: Add smaller, larger method to Size. ( #831 )
2025-05-06 15:31:11 +08:00
Jason Lee
0c6d631a39
scrollbar: Improve the scrollbar size. ( #830 )
...
## Idle
<img width="1086" alt="image"
src="https://github.com/user-attachments/assets/1acd847c-9ea4-477f-a1be-a9dd6305de60 "
/>
## Hover
<img width="1086" alt="image"
src="https://github.com/user-attachments/assets/08a700ce-98f5-41ff-b504-37ea3cf90d81 "
/>
2025-05-06 14:45:22 +08:00
Jason Lee
f4e8b952e9
modal: Add alert method to create modal with a Ok button. ( #829 )
...
- Fix to handle close modal when `on_ok`, `on_cancel` not present.
2025-05-02 10:28:26 +08:00
Jason Lee
2c06a032fb
svg_img: Fix SvgImg first load can work. ( #828 )
2025-04-30 17:35:11 +08:00
Jason Lee
38d9c24af5
chore: Update getter method to return reference to view components. ( #827 )
2025-04-30 17:18:44 +08:00
Jason Lee
3a915dba89
chore: Update GPUI 2025/04/30 ( #826 )
2025-04-30 14:41:08 +08:00
Jason Lee
6dea2cb57c
input: Clean focused_input on Input blur. ( #825 )
2025-04-30 14:08:39 +08:00
Sunli
69dad78867
svg_img: No longer use the global image loader. ( #823 )
...
Update SvgImg load logic and try to drop image to fix VRAM leak issue.
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-04-30 11:56:24 +08:00
Floyd Wang
a5e5fc52b4
dropdown: Support change options for the dropdown ( #824 )
2025-04-30 10:33:21 +08:00
Jason Lee
dd3b8b1f3d
theme: Export colors attribute. ( #822 )
2025-04-30 10:16:35 +08:00
Jason Lee
832f8b8f75
svg_img: Refactor SvgImg to avoid assign source image size and fix drop image error. ( #821 )
...
## Break Change
- Removed `source` method from `SvgImg`, now need assign source in `new`
method.
- There is no need to give image size, it will read the size from SVG
file.
2025-04-29 19:25:43 +08:00
Sunli
dc776224f9
svg_img: Fix memory leak in SvgImg ( #818 )
2025-04-28 14:42:37 +08:00
Ylin
f946560837
dropdown: Add display_title to DropdownItem to support custom title to dropdown input. ( #816 )
...
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-04-25 19:05:24 +08:00
Jason Lee
a9d145dd50
Update disabled menu, button, dropdown etc. to use default cursor. ( #814 )
...
To follow macOS UX design.
2025-04-24 21:28:15 +08:00
Jason Lee
bbb267f2bf
accordion: Add gap between title and icon. ( #813 )
2025-04-24 21:01:11 +08:00
Floyd Wang
f7c900d8eb
input: Add Copy and Eq derives for StepAction ( #812 )
2025-04-24 11:06:32 +08:00
Jason Lee
b0ff230588
table: Disable auto scroll when resize column out of the table right bounds. ( #811 )
...
https://github.com/user-attachments/assets/f1569eb5-e6e6-43f9-9425-0de5e2235163
Do same behavior like the macOS table.
2025-04-23 22:18:40 +08:00
Jason Lee
3cff72cc37
table: Fix render_tr to ensure apply with h_flex. ( #810 )
...
- Reduce last empty column to 12px.
2025-04-23 22:09:14 +08:00
Jason Lee
b4449f10cf
dropdown: Avoid selected value text wrap. ( #808 )
2025-04-22 21:19:20 +08:00
Jason Lee
5cacffcc06
chore: Fix cargo clippy.
2025-04-22 19:36:09 +08:00
Jason Lee
a195795978
input: Refactor window.focused_input by use better way to ensure update. ( #809 )
2025-04-22 19:34:41 +08:00
Jason Lee
373d97ddf0
root: Fix to reset focused_input when close modal or drawer. ( #807 )
2025-04-22 18:54:07 +08:00
Ylin
affd29dc85
table: Ensure to select row when prev or next. ( #805 )
2025-04-22 18:46:41 +08:00
Jason Lee
39da30815a
input: Fix Input escape to propagate to parent element. ( #806 )
...
Fix #803 changes broke Escape to dismiss dropdown menu.
2025-04-22 18:40:27 +08:00
Jens Krause
f7be6a245a
input: Add Esc to clean. ( #803 )
2025-04-20 10:24:47 +08:00
Jason Lee
16eb0f304b
gallery: Add to support search stories. ( #802 )
...
<img width="1196" alt="image"
src="https://github.com/user-attachments/assets/daa3f47a-0c4d-404c-a673-8e18880e8f6c "
/>
2025-04-17 20:46:57 +08:00
Jason Lee
be63d9701c
theme: Improve Switch and Sidebar selected item bg color. ( #801 )
2025-04-17 19:53:32 +08:00
Jason Lee
413d156ef4
input: Update Input text method to return &SharedString type. ( #800 )
...
## Break Changes
- input: Now the `text` method `Input` changed return type from
`SharedString` to `&SharedString`.
- list: Remove `set_query` and `query` method from `List`, you can use
`query_input` to instead.
2025-04-17 19:52:14 +08:00
Jason Lee
bef1dd2544
story: Add ClipboardStory ( #799 )
2025-04-17 18:57:23 +08:00
Jason Lee
034e465d28
list: Select first item on search. ( #798 )
2025-04-17 17:29:02 +08:00
Jason Lee
5b508d7219
gallery: Redesign the gallery. ( #797 )
...
Close #773
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/e27a28ca-cdd7-4970-8518-4fd0104bb3f8 "
/>
2025-04-17 17:12:48 +08:00
Jason Lee
225a306169
theme: Improve ThemeMode to add more features.
2025-04-16 15:26:14 +08:00
Jason Lee
e2463bbdcf
linux: Fix sync_system_appearance on Linux. ( #796 )
...
Close #104
2025-04-16 14:55:01 +08:00
Jason Lee
8d37716b88
list: Export query_input for support update the default Query Input. ( #794 )
...
## Break Change
- Updated `set_placeholder` and `set_pattern` method to add `window` and
`cx` argument.
```diff
- fn set_placeholder(&mut self, placeholder: impl Into<SharedString>)
+ fn set_placeholder(&mut self, placeholder: impl Into<SharedString>, _:
&Window, cx: &mut Context<Self>)
- fn set_pattern(&mut self, pattern: regex::Regex)
+ fn set_pattern(&mut self, pattern: regex::Regex, window: &mut Window,
cx: &mut Context<Self>)
```
2025-04-15 20:36:04 +08:00
Floyd Wang
0c4a0538e6
sidebar: Better active menu background ( #793 )
2025-04-15 14:36:02 +08:00
Floyd Wang
8930acf648
sidebar: Add suffix for menu item ( #792 )
...
| Light | Dark |
| - | - |
| <img width="913" alt="SCR-20250415-mkdr"
src="https://github.com/user-attachments/assets/5c4931e6-4d03-48ec-91c6-ade2d86de75a "
/> | <img width="913" alt="SCR-20250415-mkec"
src="https://github.com/user-attachments/assets/f85af984-ecc3-4cd7-913c-c4e93384dbf1 "
/> |
2025-04-15 14:02:52 +08:00
Jason Lee
71b79cf1b4
chore: Add Windows CI ( #789 )
2025-04-14 20:46:32 +08:00
Jason Lee
aa44fd3a43
kbd: Fix Kbd keys ordering and on Windows. ( #788 )
2025-04-14 19:27:23 +08:00
Jason Lee
9a6a0f4421
tooltip: Add action, key_binding method to Tooltip. ( #787 )
2025-04-14 17:38:21 +08:00
Floyd Wang
8ef4e2eb17
modal: Respond confirm events only when on_ok or footer present ( #786 )
2025-04-14 16:56:16 +08:00
Jason Lee
d0a73011de
tooltip: Add KeyBinding to tooltip and Button. ( #783 )
...
- Improve `Kbd::format` method.
- Add `tooltip_with_action` method to Button for display key binding in
tooltip.
-
## Break change
- The `Tooltip::new` has been changed it argument and return type.
```diff
- pub fn new(text: impl Into<Text>, _: &mut Window, cx: &mut App) ->
AnyView
+ pub fn new(text: impl Into<Text>) -> Self
```
2025-04-14 16:40:40 +08:00
Floyd Wang
95fb86ec08
checkbox: Make checked icon sizable ( #785 )
...
| Before | After |
| - | - |
| <img width="642" alt="SCR-20250414-nbwx"
src="https://github.com/user-attachments/assets/fa3daaf8-5465-49f5-8cd5-d59c19b50494 "
/> | <img width="644" alt="SCR-20250414-nbli"
src="https://github.com/user-attachments/assets/e45aa560-0183-460a-b76d-e3cb0203067f "
/> |
2025-04-14 14:47:15 +08:00
Jason Lee
73be54a0f7
input: Improve clear button position in Input. ( #782 )
...
| Before | After |
| -- | -- |
| <img width="529" alt="image"
src="https://github.com/user-attachments/assets/02fdba71-7e83-43b9-ba4c-476eb21dcf28 "
/> | <img width="530" alt="image"
src="https://github.com/user-attachments/assets/ad7b6378-c9ff-4ea4-943a-87af53a2ac79 "
/> |
2025-04-11 19:13:17 +08:00
Floyd Wang
d04866eb77
checkbox: Support sizable ( #781 )
...
| Before | After |
| - | - |
| <img width="672" alt="SCR-20250409-pgbg"
src="https://github.com/user-attachments/assets/73a46b13-a3bb-4f58-afb0-aa388bbaefb5 "
/> | <img width="669" alt="SCR-20250409-phiy"
src="https://github.com/user-attachments/assets/1230a02d-cdc7-4c2e-9949-bcad09eb2edc "
/> |
2025-04-09 17:31:56 +08:00
Floyd Wang
206a1e049b
description_list: Wrap description value if it’s too long ( #779 )
...
| Before | After |
| - | - |
| <img width="752" alt="SCR-20250408-nfvl"
src="https://github.com/user-attachments/assets/5ed558af-869a-4634-bbb5-80fc1481a15c "
/> | <img width="752" alt="SCR-20250408-ngcy"
src="https://github.com/user-attachments/assets/a5871af5-978b-421d-b608-12fa940a884c "
/> |
2025-04-08 14:57:30 +08:00
Jason Lee
231e8ea2db
history: Fix redo, undo chars order for Input. ( #775 )
...
Ref #469
https://github.com/user-attachments/assets/b12187cc-c778-4452-8761-63a849ef58a3
2025-04-03 21:17:17 +08:00
Jason Lee
d186bf7c9e
sidebar: Fix Sidebar details, something like icon size, remove view_id argument. ( #774 )
...
Also updated the Sidebar example to support expand multiple root items.
## Break Change
- Sidebar create not need assign parent view_id now.
2025-04-03 15:02:05 +08:00
王子凌
b016d9fff4
modal: Fix close Modal by clicking overlay to support closing layer by layer. ( #771 )
...
Fix the issue that wrongly trigger `overlay` click event for the
layer-stacked `modals`.
Fix #772
I.E. When clicking the `overlay`, only the last modal will possibly be
hide(If the last modal is not `overlayClosable`, click the overlay, all
the modals will not be hide).

I had tried another solution:


If this one is better than prev, I will commit it~
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-04-03 13:29: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
a60acd7e4d
list: Add secondary confirm support to list. ( #769 )
2025-04-02 16:45:27 +08:00
Jason Lee
c91dce3139
input: Add max_rows to support auto-grow. ( #768 )
...
Closes #762
https://github.com/user-attachments/assets/068a3f11-8498-4db6-a2ac-00cc043f16cf
2025-04-02 15:54:19 +08:00
Jason Lee
253c93063f
input: Fix delete beginning_of_line and end_of_line to handle empty line. ( #767 )
...
https://github.com/user-attachments/assets/58ff94df-3ff7-45ae-8657-a526b3ee75f7
2025-04-02 13:41:37 +08:00
Jason Lee
e921621a8b
scrollbar: Update min thumb size to 24px. ( #766 )
...
<img width="330" alt="image"
src="https://github.com/user-attachments/assets/ace52246-65ed-4d28-9906-c16281b6bd79 "
/>
2025-04-02 11:37:19 +08:00
Jason Lee
99e7f8ee70
history: Ensure unique History in redos and undos when push. ( #761 )
2025-04-01 19:35:16 +08:00
Jason Lee
ebe93210af
Use normal cursor for buttons. ( #760 )
...
This change to follow native UI to use normal cursor for all buttons,
items.
Only use `pointer` for link item.
2025-04-01 17:59:27 +08:00
Victor Quiroz
7986c2072b
sidebar: Fix menu item click handler ( #759 )
...
The sidebar stopped working properly. Only one item was handling the
click, by giving the ID to the `SidebarMenuItem` the issue seems to be
resolved. I guess something changed within `gpui` itself that it broke.
**Before**
https://github.com/user-attachments/assets/e4fd21a9-e16d-4be6-b687-64a8a040eee7
**After**
https://github.com/user-attachments/assets/aed91762-c8ae-49f3-aaa8-77df2155f0c6
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-04-01 16:41:46 +08:00
Jason Lee
88b5e5c023
input: Add mask_toggle button to toggle masked state to Input. ( #758 )
2025-03-31 22:57:07 +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
f34ebdf621
theme: Update table_head_foreground ( #753 )
2025-03-31 15:12:54 +08:00
Floyd Wang
13de7d5a7e
chore: Update GPUI 2025/03/31 ( #752 )
2025-03-31 10:31:39 +08:00
Floyd Wang
417e097b1a
dock: Add tab_name for collapsed tab panels ( #751 )
2025-03-28 11:44:34 +08:00
Floyd Wang
9f103bac6f
svg_img: Use system fonts to support CJK characters ( #750 )
...
| Before | After |
| - | - |
| <img width="528" alt="SCR-20250327-mpcz"
src="https://github.com/user-attachments/assets/22dc30ea-582a-4133-996a-90bcf8cb54be "
/> | <img width="535" alt="SCR-20250327-mnbv"
src="https://github.com/user-attachments/assets/5f360d17-8285-44d8-963b-17784c4c0eb5 "
/> |
2025-03-27 14:44:04 +08:00
Jason Lee
aadcf4e1df
accordion: Fix toggle accordion item. ( #749 )
...
Close #740

2025-03-27 14:22:00 +08:00
Jason Lee
e8f89e04d6
button: Update ButtonCustomVariant default variable value to use transparent. ( #746 )
2025-03-27 10:43:40 +08:00
Jason Lee
17926cea16
button: Add warning, success, info variant to Button. ( #745 )
...
<img width="1342" alt="SCR-20250327-jfzq"
src="https://github.com/user-attachments/assets/7c44458a-9467-4095-9cd6-1dcb35cc351b "
/>
<img width="1342" alt="SCR-20250327-jgak"
src="https://github.com/user-attachments/assets/07d33d60-f581-46d4-9a54-174e56ab82ca "
/>
2025-03-27 10:15:53 +08:00
Jason Lee
e582d22f11
sidebar: Fix collapsed to display icon only. ( #743 )
...
<img width="1056" alt="image"
src="https://github.com/user-attachments/assets/162f9e47-72ef-47c2-b3a4-9bc10682a624 "
/>
2025-03-27 09:35:01 +08:00
Jason Lee
814ea0e824
alert: Add to support styled. ( #736 )
2025-03-25 15:04:28 +08:00
Jason Lee
22d9394266
alert: Add Alert. ( #735 )
...


<img width="821" alt="image"
src="https://github.com/user-attachments/assets/6350f48b-6ced-4063-b115-06422d49b92c "
/>
<img width="821" alt="image"
src="https://github.com/user-attachments/assets/3d71688a-b0ca-4223-a097-858388a47f6d "
/>
<img width="821" alt="image"
src="https://github.com/user-attachments/assets/ec3af860-0f8f-420b-9da7-f390c4742492 "
/>
<img width="821" alt="image"
src="https://github.com/user-attachments/assets/d9a85c06-209a-4ef9-ac9a-8456491fedc6 "
/>
2025-03-25 14:10:24 +08:00
Jason Lee
f650491605
menu: Add external link icon to link menu item. ( #734 )
...
<img width="403" alt="image"
src="https://github.com/user-attachments/assets/ad6682b6-2114-4f55-be84-d06c02ae401e "
/>
2025-03-24 22:30:29 +08:00
Jason Lee
e0f4a7d3cd
menu: Add label item to PopupMenu. ( #733 )
...
<img width="883" alt="image"
src="https://github.com/user-attachments/assets/06071f62-ddd3-4f9e-ae2f-82b583089792 "
/>
2025-03-24 22:04:47 +08:00
Floyd Wang
f759cc5023
calendar: Fix duplicate IDs cause click events not respond ( #732 )
2025-03-24 20:01:29 +08:00
Jason Lee
8a3b858d1a
tabs: Add menu to TabBar to display more items. ( #731 )
...
<img width="752" alt="image"
src="https://github.com/user-attachments/assets/a7efb600-553a-4b78-a8f4-aaba504d44f0 "
/>
- tabs: Use default cursor when Tab is disabled.
- popup_menu: Add to support add menu item with disabled state.
2025-03-24 18:05:54 +08:00
Floyd Wang
760c0597eb
description_list: Fix incorrect align items for horizontal layout ( #730 )
...
| Before | After |
| - | - |
| <img width="539" alt="image"
src="https://github.com/user-attachments/assets/ecd997b5-1f59-4c41-83a3-dfdee6b1be8a "
/> | <img width="556" alt="image"
src="https://github.com/user-attachments/assets/1088d466-1635-45c3-b578-9ada1c960d66 "
/> |
2025-03-24 17:15:46 +08:00
Jason Lee
12e3678e55
description_list: Update label_width type to accept any Into<DefiniteLength>. ( #729 )
2025-03-24 15:29:50 +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
9d2a70be48
svg_img: Reduce ImageSource creation ( #728 )
2025-03-21 17:22:12 +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
Jason Lee
c98e4f0521
checkbox: Add children to Radio, Checkbox to display long texts. ( #724 )
...
This change is going to solve the wrapped text line-height.
Before this change, the Label is must set `line-height: 100%` to render
at same line with the checkbox.
But if there have a long text in label, wrapped lines need more
line-height to leave lines spaces. But if we set line-height over the
100%, that the checkbox will not align horizontal center.
So, this change to use other child to solve this issue, we can set
line-height to the child not to the label.
<img width="1204" alt="image"
src="https://github.com/user-attachments/assets/981cf925-01c7-48d7-9dd2-881c727a1759 "
/>
2025-03-20 19:12:48 +08:00
Floyd Wang
49e8b06ccb
label: Fix typo ( #722 )
2025-03-19 14:15:49 +08:00
Jason Lee
88325ea14b
input: Add insert and replace method to Input. ( #721 )
...
Close #719
https://github.com/user-attachments/assets/aed24aef-c69f-4512-81bb-bb7e4a6de14e
2025-03-17 22:40:09 +08:00
Jason Lee
a0c7d0b791
tab: Adjust underline tab style. ( #720 )
...
<img width="1293" alt="image"
src="https://github.com/user-attachments/assets/bd0cdd71-9e83-460a-8224-f255a590f2ac "
/>
2025-03-17 21:50:39 +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
Floyd Wang
8e7ef5631e
dropdown_button: Support outline style ( #716 )
2025-03-12 17:23:37 +08:00
Jason Lee
87b8958059
modal: Use bold text for Modal title. ( #715 )
...
<img width="995" alt="image"
src="https://github.com/user-attachments/assets/3e9ba919-eb91-4e8d-ba89-3a85e263e550 "
/>
2025-03-12 11:57:59 +08:00
Jason Lee
6da7de5299
button: Improve Button to support combine outline with other variants. ( #714 )
...
<img width="1385" alt="image"
src="https://github.com/user-attachments/assets/240df695-bfd5-4680-89a2-2640db206b24 "
/>
2025-03-12 11:57:25 +08:00
Jason Lee
89170eea1d
color_picker: Add icon use icon as color picker button. ( #711 )
2025-03-11 21:14:14 +08:00
Jason Lee
d0abcb2456
switch: Fix switch label to vertical center. ( #710 )
...
<img width="775" alt="image"
src="https://github.com/user-attachments/assets/c004e552-c161-4e09-9543-13727382204b "
/>
2025-03-11 20:55:58 +08:00
Jason Lee
c2dddf6f55
input: Update gap between input and prefix, suffix. ( #709 )
...
<img width="813" alt="image"
src="https://github.com/user-attachments/assets/9d99a74a-92b6-44f5-bf33-35ddef6a7ca0 "
/>
2025-03-11 20:40:50 +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
Jason Lee
d8ec1ee516
title_bar: Fix TITLE_BAR_HEIGHT const to it actually height 34px. ( #707 )
2025-03-11 18:50:32 +08:00
Jason Lee
5e4e810c0d
description_list: Add to support border style to DescriptionList vertical layout. ( #706 )
...
<img width="899" alt="image"
src="https://github.com/user-attachments/assets/38108d88-7b27-4964-8b1d-07b81522698b "
/>
<img width="980" alt="image"
src="https://github.com/user-attachments/assets/c4467a72-0011-486b-9918-af21297b8c3e "
/>
<img width="980" alt="image"
src="https://github.com/user-attachments/assets/21e8fc31-1642-4ab4-b180-01aea6e81b38 "
/>
<img width="980" alt="image"
src="https://github.com/user-attachments/assets/65a02a85-7538-4b6f-83e5-33502c30367e "
/>
2025-03-11 17:59:56 +08:00
Jason Lee
65fad70c21
menu: Fix min_w support to PopupMenu. ( #705 )
2025-03-11 13:41:41 +08:00
Jason Lee
d451ce5c2d
menu: Add menu_element_with_icon, menu_element_with_check to PopupMenu. ( #704 )
...
- Added `menu_element_with_icon` and `menu_element_with_check` method to
PopupMenu.
<img width="317" alt="image"
src="https://github.com/user-attachments/assets/d32575e3-25fc-4d6f-bde2-ec5bc5f238dd "
/>
## Break changes
- menu: Renamed `menu_with_element` method to `menu_element`.
2025-03-11 11:18:43 +08:00
Jason Lee
6a00cfcc4a
text_view: Fix HTML render to support blockquote. ( #703 )
...
<img width="850" alt="image"
src="https://github.com/user-attachments/assets/4d8f662f-aebe-4c40-bc56-828627f16064 "
/>
2025-03-10 22:53:53 +08:00
Jason Lee
61bb78d174
tab: Update default tab size padding x to match with Panel's padding. ( #701 )
...
- Fix muted_foreground in dark mode.
- Fix secondary button active color in dark mode.
- Fix to ensure render last empty space when TabBar have suffix.
<img width="1203" alt="image"
src="https://github.com/user-attachments/assets/65144893-6705-4087-87f3-7e478eaa1405 "
/>
<img width="1203" alt="image"
src="https://github.com/user-attachments/assets/0fe3b72b-11f5-4917-959c-a2c88ba0213c "
/>
2025-03-10 21:23:00 +08:00
Jason Lee
54d74a9617
kdb: Add min width 20px to Kdb. ( #700 )
...
<img width="358" alt="image"
src="https://github.com/user-attachments/assets/824a0cdd-e03b-49f4-bde6-b77ae0ab48cd "
/>
2025-03-10 17:12:43 +08:00
Jason Lee
4db0fd5819
kbd: Use background for Kbd. ( #699 )
2025-03-10 17:03:41 +08:00
Jason Lee
3e4a3ed046
tag: Add color to Tag to support more colors. ( #698 )
...
- Add `ColorName` enum.
<img width="588" alt="image"
src="https://github.com/user-attachments/assets/20670946-1a4f-45ff-b5ac-81e7eb760242 "
/>
<img width="586" alt="image"
src="https://github.com/user-attachments/assets/7ce4a87f-fa6b-4794-83c5-3f18e6d09dcb "
/>
2025-03-07 21:41:04 +08:00
Jason Lee
8f2ca40c51
tab: Add new pill style, renamed old pill tab to outline. ( #696 )
...
<img width="1011" alt="image"
src="https://github.com/user-attachments/assets/4800a737-4e57-405b-b083-bf57ae3038ad "
/>
## Break Changes
- As you see on the above screenshot, the old `pill` style has been
renamed to `outline`.
2025-03-07 18:46:47 +08:00
Jason Lee
8611a23aae
kbd: Add Kdb to show keystroke. ( #695 )
...
<img width="627" alt="image"
src="https://github.com/user-attachments/assets/c2a6f385-8820-4629-be57-bb5958e531ce "
/>
2025-03-07 14:29:50 +08:00
Jason Lee
c5416c4774
menu: Fix sub-menu render position. ( #694 )
...
<img width="385" alt="image"
src="https://github.com/user-attachments/assets/2e8527af-08af-4176-b4cf-931f79b6d45c "
/>
2025-03-07 11:47:27 +08:00
Jason Lee
bf1420357b
icon: Fix icon to support style size. ( #693 )
2025-03-07 10:52:57 +08:00
Jason Lee
3a4f442945
tab: Keep last empty when suffix exist. ( #692 )
2025-03-06 19:38:45 +08:00
Jason Lee
c9c6449d24
toggle: Add Toggle and ToggleGroup. ( #691 )
...
- Improve `Icon` to inherit parent element font size by default.
<img width="777" alt="image"
src="https://github.com/user-attachments/assets/1a0ee94e-46ef-4b02-9538-09880586d3f2 "
/>
<img width="777" alt="image"
src="https://github.com/user-attachments/assets/4ecb016f-2e7c-4266-9a25-eae2566b2844 "
/>
2025-03-06 19:10:28 +08:00
Jason Lee
d009b37bf1
tab: Add tab_bar_segemented theme variable. ( #690 )
2025-03-05 19:07:58 +08:00
Floyd Wang
9194d7f6bb
popup_menu: Ensure focus is returned after menu is closed ( #689 )
2025-03-05 16:41:43 +08:00
Jason Lee
4c96679cf7
tab: Improve segmented tab style and add for icon mode tab support. ( #688 )
...
<img width="873" alt="image"
src="https://github.com/user-attachments/assets/f616a9ba-0a60-49f5-8291-04f79f5b582c "
/>
<img width="948" alt="image"
src="https://github.com/user-attachments/assets/5ba1b50e-5b5f-45e1-89ca-683bcac8331a "
/>
<img width="929" alt="image"
src="https://github.com/user-attachments/assets/6545b67f-6c53-482f-a3ac-b7929c9bec99 "
/>
<img width="1153" alt="image"
src="https://github.com/user-attachments/assets/06abb411-43a7-4472-8e58-d7c8032bed7b "
/>
2025-03-05 15:41:03 +08:00
Jason Lee
6bf26f6f72
scrollbar: Update Scrollbar default to use hover to show on Linux. ( #687 )
...
Continue #686
2025-03-05 10:34:16 +08:00
Jens Krause
c06a0c5d78
scrollbar: Fix Scrollbar not clickable when it is always showing. ( #686 )
...
On `platform` level,
[should_auto_hide_scrollbars()](76a81607de/crates/gpui/src/platform.rs (L205) )
might be `false` for some `platform`s, e.g. for `Linux`.
That's why another check is needed to make scrollbars work properly on
Linux.
Fixes #685
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-03-05 10:14:22 +08:00
Jason Lee
c3f08d52b9
text_view: Add syntax highlight to CodeBlock. ( #684 )
...
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/e7539df4-20db-431b-9bbc-52e08e9de062 "
/>
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/85d52319-1029-4306-8629-ec0321d0571b "
/>
2025-03-04 21:50:50 +08:00
Jason Lee
8c4884d881
tab: Remove w_full from TabBar. ( #683 )
2025-03-04 17:31:40 +08:00
Floyd Wang
f8a530279a
dock: Fix incorrect extra inner padding in Panels. ( #682 )
2025-03-04 17:22:17 +08:00
Jason Lee
6c9a317b3b
scrollbar: Fix scroll to show scrollbar. ( #681 )
...
Fix #624 was broke scroll to show behaviors.
2025-03-04 15:37:13 +08:00
Jason Lee
581d92378c
tab: Add xsmall, large style to Tab. ( #680 )
...
<img width="1047" alt="image"
src="https://github.com/user-attachments/assets/763fc4c9-bda8-4292-83c5-4a44db091938 "
/>
<img width="1047" alt="image"
src="https://github.com/user-attachments/assets/e21d5344-f31c-43b3-af6b-28d845af77f8 "
/>
<img width="1047" alt="image"
src="https://github.com/user-attachments/assets/3da37f16-55aa-44b3-98c2-4cadfae458b3 "
/>
<img width="1047" alt="image"
src="https://github.com/user-attachments/assets/cfbb1f7e-c810-4387-b7dc-d1d2870d50a6 "
/>
2025-03-04 10:26:12 +08:00
Jason Lee
793a35eff2
text_view: Fix img height in TextView. ( #679 )
...
Close #643
<img width="1103" alt="image"
src="https://github.com/user-attachments/assets/0f0a0af0-8fe2-4322-b012-0f970ba9e13d "
/>
Ref https://github.com/zed-industries/zed/pull/25632
2025-03-03 20:51:26 +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
7582ad3fb3
text_view: Add heading_base_font_size to TextViewStyle and fix text wrap for list item. ( #670 )
...
- Fix list item to wrap text.
<img width="797" alt="image"
src="https://github.com/user-attachments/assets/9e8156ad-bf58-4d7a-a850-69dfcb56c850 "
/>
2025-02-28 11:43:08 +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
Floyd Wang
e61f6204cc
calendar: Differentiate text color of disabled and non-current month ( #668 )
...
| Before | After |
| - | - |
| <img width="341" alt="image"
src="https://github.com/user-attachments/assets/452d57b1-5ec6-4ad3-bc30-ed8a966d12e5 "
/> | <img width="350" alt="image"
src="https://github.com/user-attachments/assets/9f664cea-aa55-479a-8d5b-61570101a66f "
/> |
2025-02-27 11:14:28 +08:00
Jason Lee
3ba63915ce
text_view: Fix some case may lose spaces, <br> in HTML and Markdown render. ( #667 )
2025-02-26 17:52:18 +08:00
Jason Lee
ffa848fb26
text_view: Fix markdown table alignment. ( #666 )
2025-02-26 15:49:13 +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
Jason Lee
00e5385878
input: Add h, h_full to Input for multi-line mode. ( #642 )
...
Close #641
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/9cbe090c-a5d7-4929-98db-5f71349fe559 "
/>
2025-02-25 16:17:39 +08:00
Jason Lee
c74791aac8
description_list: Add DescriptionList. ( #658 )
...
<img width="1089" alt="image"
src="https://github.com/user-attachments/assets/15069422-14aa-4fa3-b661-65fcf7417323 "
/>
<img width="1089" alt="image"
src="https://github.com/user-attachments/assets/df4a4b90-b304-40d3-a9ce-1be73eaaa9f4 "
/>
<img width="1089" alt="image"
src="https://github.com/user-attachments/assets/1deaf1e8-4b30-4afd-90af-1bd0eecf53e2 "
/>
2025-02-25 15:32:59 +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
Jason Lee
9f429592ce
text_view: Remove last paragraph bottom margin. ( #660 )
...
Now, we can be easy to use TextView for 1 line text.
## Break Changes
- Removed `inline` method by previous #649 added, this is not needed.
2025-02-25 14:27:59 +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
8edd80d5ee
modal: Do not occlude when overlay is not enable. ( #657 )
2025-02-25 12:25:46 +08:00
Jason Lee
806c6dffe8
tiles: Add active_panel method to Tiles. ( #656 )
2025-02-25 12:00:43 +08:00
Ylin
6d7f20cd4f
webview: Update visible state when hide or show ( #654 )
2025-02-25 11:49:29 +08:00
Floyd Wang
9739493bce
dock: Add mutable reference for set_active ( #655 )
2025-02-25 11:46:54 +08:00
Jason Lee
3b4065ce4e
text_view: Stop propagation on click link in TextView. ( #650 )
...
To avoid trigger parent element, for example as a Label for checkbox.
2025-02-24 18:07:53 +08:00
Jason Lee
6bcc34c7f0
checkbox, switch: Improve Checkbox, Switch to use wrap text and TextView. ( #651 )
...
This change to revert #233 to let label to wrap.
<img width="1279" alt="image"
src="https://github.com/user-attachments/assets/8081216f-0ea0-4ba2-9095-6fd84102e03b "
/>
2025-02-24 18:04:06 +08:00
Jason Lee
8fa210bc21
text_view: Update Switch, Checkbox, Radio to let label method support TextView. ( #649 )
...
- Add `style` method to TextView.
- Add `inline` method to TextView to use default inline style.
2025-02-24 15:49:54 +08:00
Jason Lee
9dade704fb
webview: Let webview as a feature and not default enable. ( #648 )
...
Close #646
2025-02-24 14:24:22 +08:00
Jason Lee
d54dcdf417
text_view: Refactor TextView to RenderOnce to easy usage. ( #647 )
2025-02-24 14:13:50 +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
Jason Lee
06f9178ec4
text: Add TextView with Markdown and Simple HTML support. ( #639 )
2025-02-20 20:08:59 +08:00
ihavecoke
6c39078e8a
dock: Add drag drop event for tiles ( #640 )
2025-02-19 22:20:48 +08:00
Jason Lee
75212c3aba
chore: Fix focusd_border typo in #635 ( #637 )
2025-02-17 17:29:40 +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
4c554580c9
chore: Rename outline styled method to focused_border. ( #635 )
...
This change to avoid conflict with `outline` method in Button.
## Break changes:
- The `outline` method in `StyledExt` now renamed to `focused_border`.
2025-02-17 14:34:54 +08:00
Jason Lee
d96b4b44d2
number_input: Fix button margin. ( #634 )
2025-02-17 14:29:33 +08:00
Jason Lee
231772ee4e
modal: Remove opacity animation for improve Modal appear. ( #633 )
2025-02-17 13:32:17 +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
Jason Lee
e4c31f1ce4
tiles: Limit tile panel move to avoid out of the container. ( #630 )
2025-02-17 10:24:06 +08:00
Jason Lee
b18dd47ce0
panel: Only highlight resize handle when dragging. ( #629 )
2025-02-14 18:42:56 +08:00
Jason Lee
851099f890
sidebar: Refactor Sidebar API to avoid map call will segmentation fault on release. ( #628 )
...
Close #471
```
Finished `release` profile [optimized] target(s) in 9.99s
Running `target/release/examples/sidebar`
[1] 30606 segmentation fault cargo run --example sidebar --release
```
This may cause by used `map` break by maybe Rust compiler bug, I
detected that if I remove a `map`, then the crash will gone.
So, this changes to refactor the Sidebar API to avoid use `map`.
2025-02-14 17:18:39 +08:00