Jason Lee
ee40f65fb5
markdown: Add to support LinkReference and Footnote. ( #1201 )
2025-09-03 16:39:17 +08:00
Jason Lee
f4a292d975
docs: Fix compare table.
2025-09-03 15:03:16 +08:00
Jason Lee
6cfdf8b629
docs: Add compare to others libraries. ( #1199 )
2025-09-03 14:59:30 +08:00
Jason Lee
2cfb5d24a9
highlighter: Use sum_tree to store the highlight cache. ( #1198 )
2025-09-03 14:09:46 +08:00
Jason Lee
189bd6e9a3
highlighter: Fix some editing operatons might result incorrect hightlight. ( #1197 )
...
This PR just removed the partial update highlight cache code. This logic
will get incorrect offset.
To make sure highlight correct first.
Remove this will slow down performance (On editing), when is more than
5K lines, but if less than this the performance can accept.
2025-09-02 18:52:02 +08:00
Jason Lee
34ec2564f8
theme: Fix default dark code editor background color.
2025-09-02 17:28:19 +08:00
Jason Lee
02b432ed17
scrollbar: Fix scrollbar width on always show mode. ( #1196 )
...
And fixes #1192 render bug.
2025-09-02 15:48:06 +08:00
Jason Lee
6569bead8b
input: Fix horizontal scrolling offset. ( #1191 )
...
Continue #1131 to fix some scroll offset details.
- Keep line number at left.
- Show scrollbar next the line_numbers right side.
- Fix scroll_size calculate issue that will always show vertical
scrollbar, even not have enough contents.
<img width="888" height="641" alt="image"
src="https://github.com/user-attachments/assets/5d388377-3f6d-4530-b837-6c719e1eb48f "
/>
2025-09-02 14:46:28 +08:00
iincity
ca548bd856
input: Add to support horizontal scrolling to multi-line text. ( #1131 )
...
- Add `soft_wrap` option to build InputState, default true.
<img width="1156" height="1166" alt="image"
src="https://github.com/user-attachments/assets/2eab2db0-b3fc-48ce-83cb-1d6715313247 "
/>
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-09-01 12:33:21 +08:00
Jason Lee
34d2a75894
theme: Add theme_name to get current active theme name. ( #1190 )
...
And fix theme menu selected item in example when theme mode changed.
2025-09-01 11:39:01 +08:00
Jason Lee
e4a367f157
chore: Update GPUI to solve SVG rendering size. ( #1189 )
...
https://github.com/zed-industries/zed/pull/36663
2025-09-01 10:48:49 +08:00
Jason Lee
785df6a5ff
chore: Remove SvgImg element. ( #1187 )
...
## Break Change
- The `SvgImg` element has been removed.
This is a special implementation and should not be included in the GPUI
Component.
2025-08-29 17:37:11 +08:00
Floyd Wang
7fb6000189
plot(scale): Correct the least index ( #1186 )
2025-08-29 16:42:59 +08:00
Floyd Wang
1267857a8c
plot(scale): Point scale support single point ( #1185 )
...
<img width="447" height="446" alt="image"
src="https://github.com/user-attachments/assets/fff44252-ff5b-4d73-8b98-0eb4c0877563 "
/>
2025-08-29 15:05:51 +08:00
Jason Lee
709a888e15
accordion: Fix Accordion hover background. ( #1184 )
...
- Improved `accordion.hover` theme color default fallback to `accent`.
- Fix incorrect Accordion border top radius on hover.
- Removed unused `accordion.active.background` theme variable.
<img width="1106" height="799" alt="image"
src="https://github.com/user-attachments/assets/3b1d3e56-7e77-4118-ac3c-231c6571940a "
/>
2025-08-29 11:51:32 +08:00
Floyd Wang
f98ad5232b
table: Fix ESC event not propagating to modal with selection ( #1183 )
2025-08-29 10:52:30 +08:00
Jason Lee
74b3aa7e67
text_view: Add to support selection. ( #1169 )
...
### Links
Maybe we can do it in TextLayout in GPUI:
fda6eda3c2/crates/gpui/src/elements/text.rs (L309)
## Demo
https://github.com/user-attachments/assets/abbebee7-df8f-4067-86a7-15bc1a4c44cd
## Todo
- [x] Test for HTML View.
- [x] CodeBlock selection support.
- [x] Selection lines sometimes incorrect.
- [x] Listener Bounds changed to unselect.
2025-08-28 18:09:30 +08:00
Floyd Wang
4715a5a2dc
table: Fix the border render issue on stripe table ( #1179 )
...
| Before | After |
| - | - |
| <img width="426" height="134" alt="SCR-20250828-pail"
src="https://github.com/user-attachments/assets/1c5f8aa7-a55e-4a8f-a6db-1010303586d1 "
/> | <img width="424" height="125" alt="SCR-20250828-paev"
src="https://github.com/user-attachments/assets/dc9950f5-c1a8-4b06-847a-eedb0cd67f60 "
/>
2025-08-28 17:16:35 +08:00
Floyd Wang
bafc9fed12
table: Refine the row style ( #1178 )
...
Better solution for #1177 .
2025-08-28 11:11:36 +08:00
Floyd Wang
f72e858d3a
table: Render custom row background first on striped table ( #1177 )
2025-08-28 10:44:10 +08:00
Floyd Wang
2a652dcc01
chore: Bump gpui & wireup Keystroke changes ( #1176 )
2025-08-27 17:44:10 +08:00
Jason Lee
5b6f2dc26e
alert: Fix the icon position and let all size use same text size. ( #1175 )
...
<img width="1270" height="1286" alt="image"
src="https://github.com/user-attachments/assets/08c485bf-daac-4490-8fca-1dd2f0efa396 "
/>
<img width="1270" height="1286" alt="image"
src="https://github.com/user-attachments/assets/71bb1a59-0669-4102-8529-df81435fcb7d "
/>
<img width="1270" height="1286" alt="image"
src="https://github.com/user-attachments/assets/1ebd6095-4bd8-47e8-88a2-fdd470c47344 "
/>
<img width="1270" height="1286" alt="image"
src="https://github.com/user-attachments/assets/71bb1a59-0669-4102-8529-df81435fcb7d "
/>
2025-08-27 11:06:31 +08:00
Floyd Wang
9c615e5413
theme: Get the correct overlay color ( #1174 )
2025-08-26 14:31:14 +08:00
Remco Smits
e1c354916a
markdown: Fix that style attribute values are extracted correctly from img element ( #1171 )
...
This PR fixes an issue with parsing the styles attribute values. The
main issue it fixes is that we tried splitting on `:` twice which we
should only do once.
Before this change see the following variable values:
decl="width: 10px"
rule=["width", "10px"] (each iteration one value)
And for each rule value we tried splitting again on `:` which is wrong
we should only do this once.
2025-08-25 09:28:26 +08:00
Jason Lee
09ab49b2d3
tab: Fix segmented and underline tab style details. ( #1168 )
2025-08-21 20:04:50 +08:00
Jason Lee
4e5aca3842
group_box: Update GroupBox style. ( #1167 )
...
- Removed padding x of the Group Title.
- Added `fill` variant and change default to use no background and
paddings style.
<img width="1120" height="1337" alt="image"
src="https://github.com/user-attachments/assets/958e902f-3481-424c-a923-62746175aabf "
/>
2025-08-21 18:17:58 +08:00
Jason Lee
554082b969
text_view: Fix inline image render. ( #1166 )
...
GPUI does not support inline image into an `InteractiveText` yet. So
here, let it render into a block line.
<img width="1201" height="902" alt="image"
src="https://github.com/user-attachments/assets/797baeae-8764-417a-a907-e0d22956bf62 "
/>
<img width="1064" height="805" alt="image"
src="https://github.com/user-attachments/assets/a5ef7000-aa71-4c1b-8a82-2a0f36649fd6 "
/>
2025-08-21 16:30:58 +08:00
Jason Lee
8ed135d41a
Revert "modal: Avoid background color with alpha." ( #1165 )
...
Reverts longbridge/gpui-component#1154
By #1162 changes, this is not needed anymore.
2025-08-21 10:53:04 +08:00
Jason Lee
c4c948b177
theme: Fix reload theme to keep last selected. ( #1164 )
2025-08-20 17:33:12 +08:00
Jason Lee
eb5fa06809
theme: Use more lighter group_box fallback color. ( #1163 )
2025-08-20 17:19:10 +08:00
Jason Lee
396c8dbe63
theme: Improve theme color fallback to use blend to avoid alpha. ( #1162 )
...
Also updated the themes colors to match this default rule.
2025-08-20 16:37:46 +08:00
Floyd Wang
9b3900b6cf
plot: Fix the full circle cannot be drawn ( #1161 )
2025-08-20 16:01:15 +08:00
Jason Lee
1bbc4b9f23
list: Fix List scroll to item by use deferred. ( #1160 )
2025-08-20 13:42:25 +08:00
Jason Lee
8ae4ffbb0c
dropdown: Fix dropdown menu width align to input width. ( #1159 )
...
This caused by the `bounds` of `canvas` prepaint callback now is not
including the border widths.
## Before
<img width="1070" height="967" alt="image"
src="https://github.com/user-attachments/assets/9ad963bb-c2b0-4b21-bbd6-8e961f779d2f "
/>
## After
<img width="1229" height="1097" alt="image"
src="https://github.com/user-attachments/assets/568f71be-932f-4126-b37a-b92aea3bf88a "
/>
2025-08-20 11:36:42 +08:00
Jason Lee
e29418e9e4
list: Fix List scroll_to_item position. ( #1158 )
2025-08-20 11:30:14 +08:00
Jason Lee
35ba09a561
theme: Add Flexoki theme. ( #1157 )
...
https://stephango.com/flexoki
<img width="1382" height="1178" alt="image"
src="https://github.com/user-attachments/assets/781773ac-1b3f-4703-a156-3616159d4457 "
/>
<img width="1382" height="1178" alt="image"
src="https://github.com/user-attachments/assets/745e4ebd-5957-4376-b35c-8e7d9de5996a "
/>
2025-08-20 10:44:10 +08:00
Jason Lee
fb41e63ea8
input: Fix visible range when multi-line text have soft wrap. ( #1155 )
...
## Before
<img width="1130" height="783" alt="image"
src="https://github.com/user-attachments/assets/3e0db5f4-bb84-480f-8b38-dbe24e6c6214 "
/>
## After
https://github.com/user-attachments/assets/fdaed71e-3ab8-4258-a1eb-b731181ca31c
2025-08-19 19:21:12 +08:00
Floyd Wang
7fc1544a10
virtual_list: Do not trigger scrolling if content is smaller than container ( #1156 )
2025-08-19 19:18:38 +08:00
Jason Lee
fc764d8e96
modal: Avoid background color with alpha. ( #1154 )
2025-08-19 14:10:32 +08:00
Jason Lee
8e525c6c99
modal: Improve paddings and gap in Modal. ( #1153 )
2025-08-19 11:41:12 +08:00
Jason Lee
6ae7558c44
theme: Add ThemeRegistry to load and watch themes dir. ( #1148 )
2025-08-18 19:29:27 +08:00
Jason Lee
dcca730d65
group_box: Add GroupBox element. ( #1146 )
...
Close #1144
## Break Changes
- Renamed used theme variable `card`, `card_foreground` to `group_box`,
`group_box_foreground` for GroupBox.
<img width="1088" height="958" alt="image"
src="https://github.com/user-attachments/assets/adb1cbe6-fd6f-4d22-a434-39455f57ce09 "
/>
2025-08-18 11:36:07 +08:00
Floyd Wang
566f5b0d4d
fixup! plot: Fix the point scale cannot selecting the last point ( #1143 )
2025-08-15 17:23:42 +08:00
Floyd Wang
4c545165eb
plot: Fix the point scale cannot selecting the last point ( #1143 )
2025-08-15 17:09:41 +08:00
Floyd Wang
d559b56fb0
plot: Improve the band scale least_index ( #1141 )
2025-08-15 11:23:11 +08:00
Jason Lee
406bf8d929
chore: Fork html5minify for HTML render. ( #1140 )
...
Continue #1137
Forked html5minify to improve:
- Resolve `\n` not replaced issue, now no need Regexp to replace.
- Resolve the difference version of html5ever dependency.
2025-08-15 11:10:23 +08:00
Jason Lee
31fbec5393
story: Fix list group color in story. ( #1139 )
2025-08-15 10:28:00 +08:00
Jason Lee
eaeabdb0ef
scrollbar: Remove max_fps method. ( #1138 )
2025-08-15 10:17:07 +08:00
Jason Lee
899fbd693a
chore: Use html5minify instead of minify-html. ( #1137 )
...
Ref #1132
This change to reduce release mode binary size from 21MB to 12MB.
## HTML Render example
<img width="1712" height="1312" alt="image"
src="https://github.com/user-attachments/assets/f07c02c9-1b0e-4aa4-b81a-d2b0ac4f7260 "
/>
2025-08-15 09:52:38 +08:00
Jason Lee
9a389224f3
chore: Update GPUI and other crates. ( #1136 )
2025-08-14 19:57:53 +08:00