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
Floyd Wang
81e6da503b
chore: Remove unused feature ( #702 )
2025-03-10 22:17:27 +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
4c9c7980ee
chore: Upgrade GPUI 2025/03/07 ( #697 )
2025-03-07 20:22:58 +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
42c82bfc31
story: Rename closeable to closable. ( #671 )
2025-02-28 14:33:30 +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
6a125b391e
chore: Update example images in Markdown and HTML examples. ( #664 )
2025-02-26 15:26:22 +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
e5371c3209
ci: Temporarily skip machete ( #663 )
...
https://github.com/actions/runner-images/pull/11661
`cargo-machete` needs edition 2024, reopen after this PR is merged.
2025-02-25 15:13:54 +08:00