Commit graph

57 commits

Author SHA1 Message Date
Nathan Sobo
d13a21c238 Don't move in paint 2023-12-14 15:15:18 -07:00
Mikayla
fd34d1da31
Add back semi-funcitonal pane resizing code 2023-12-08 16:29:42 -08:00
Julia
13f4cc563c Merge branch 'main' into zed2-breadcrumbs 2023-12-01 11:02:34 -05:00
Julia
428c517693 Merge branch 'main' into zed2-breadcrumbs 2023-11-30 11:38:29 -05:00
Antonio Scandurra
5243401afa Pass a WindowContext in request_measured_layout
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-11-30 17:12:40 +01:00
Antonio Scandurra
d9b8c07b1e Lift Send and Sync restriction for measurements 2023-11-30 16:37:57 +01:00
Max Brunsfeld
2bd428102b Use pointer cursor style for clickable ranges in InteractiveText 2023-11-29 12:42:09 -08:00
Julia
d551b41aae zed2: Mostly port breadcrumbs & improve StyledText api
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-11-27 16:09:31 -05:00
Antonio Scandurra
682712f132 Account for previous line lengths when returning index 2023-11-24 18:32:48 +01:00
Antonio Scandurra
56d043f671 Allow finding which ranges were clicked on an InteractiveText 2023-11-23 18:08:49 +01:00
Nathan Sobo
c23f17ee0b Reorganize element-related traits 2023-11-22 11:19:43 -07:00
Antonio Scandurra
2b6e8de11f Don't perform wrapping in completions 2023-11-22 14:23:09 +01:00
Antonio Scandurra
fff2d7955e Round up line width 2023-11-22 14:01:22 +01:00
Antonio Scandurra
3a8e9b5697 Avoid holding borrow to editor while painting child elements 2023-11-22 11:40:38 +01:00
Conrad Irwin
d0dd44faad Merge branch 'main' into callback-handles 2023-11-20 12:21:42 -07:00
Conrad Irwin
f86480ba5d Merge followup mess 2023-11-20 09:58:05 -07:00
Conrad Irwin
0798cfd58c Merge branch 'main' into derive-element-redux 2023-11-20 09:15:38 -07:00
Mikayla
88024ca7c9
Remove V parameter on elements 2023-11-19 18:32:31 -08:00
Conrad Irwin
0711121586 Add some test cases 2023-11-18 22:16:28 -07:00
Nathan Sobo
33cd6f520a Clean compile with redesigned element traits 2023-11-18 21:51:47 -07:00
Conrad Irwin
cf47ed2c5f Fix wrapping when parent has a max_width
(Also avoid re-wrapping text we already wrapped)
2023-11-18 21:31:16 -07:00
Conrad Irwin
7172ce37b1 Fix text wrapping when a child of a v_stack() 2023-11-18 20:35:22 -07:00
Nathan Sobo
adc355a1e6 Element refinement passing on ui2 2023-11-18 20:05:47 -07:00
Nathan Sobo
2515bbf990 Move self in Element::paint
Remove mutable state borrows in favor of state ownership in render processes to streamline element rendering.
2023-11-17 23:32:55 -07:00
Nathan Sobo
c866c211b5 Make static str and SharedString implement Element 2023-11-17 13:48:01 -07:00
Nathan Sobo
9558da8681 Separate WrappedLines from ShapedLines
ShapedLines are never wrapped, whereas WrappedLines are optionally wrapped if
they are associated with a wrap width. I tried to combine everything because
wrapping is inherently optional for the Text element, but we have a bunch of
APIs that don't make sense on a line that may wrap, so we need a distinct type
for that case.
2023-11-16 23:10:51 -07:00
Antonio Scandurra
33a808a49b WIP 2023-11-15 20:41:09 +01:00
Nathan Sobo
364e3e7de5 Merge remote-tracking branch 'origin/main' into element-types 2023-11-14 01:55:58 -07:00
Nathan Sobo
27fb381cca Checkpoint 2023-11-14 01:15:48 -07:00
Conrad Irwin
c5878cbd5f Add Text::styled() and use it in command palette
Prevents jumping while typing
2023-11-13 19:53:55 -07:00
Nathan Sobo
922bb3195b WIP 2023-11-13 18:58:42 -07:00
Nathan Sobo
76754c559c WIP 2023-11-13 18:18:25 -07:00
Mikayla
d197660d3b
Fix broken tests and comment out remaining tests 2023-11-13 16:46:06 -08:00
Antonio Scandurra
6929a71827 Ceil measured width for Text element 2023-11-10 16:41:13 +01:00
Max Brunsfeld
69eb49a2ed Merge branch 'main' into picker 2023-11-07 09:34:57 -08:00
Antonio Scandurra
a866370dc1 Paint lines 2023-11-07 12:25:33 +01:00
Mikayla
3c93b585ab
Checkpoint 2023-11-06 15:11:22 -08:00
Antonio Scandurra
64ad8943ba Remove more Send bounds and simplify view rendering 2023-11-02 09:44:16 +01:00
Nathan Sobo
0285284ae1 Rename IntoAnyElement trait to Component 2023-10-26 12:46:52 +02:00
Marshall Bowers
8b972f6d8e WIP: Fix compilation of gpui2 2023-10-26 09:51:33 +02:00
Nathan Sobo
0910760b76 Reduce the need for Send + Sync bounds on generics 2023-10-24 14:20:01 +02:00
Antonio Scandurra
e4fe9538d7 Checkpoint 2023-10-21 16:01:47 +02:00
Antonio Scandurra
f3979a9f28 Checkpoint 2023-10-21 15:59:52 +02:00
Marshall Bowers
88a6a41c7c Revert changes to gpui2 crate 2023-10-06 15:49:53 -04:00
Marshall Bowers
b369a6dc2a Merge branch 'main' into marshall/merge-main-into-gpui2 2023-10-06 15:41:18 -04:00
Marshall Bowers
456baaa112
Mainline GPUI2 UI work (#3099)
This PR mainlines the current state of new GPUI2-based UI from the
`gpui2-ui` branch.

Included in this is a performance improvement to make use of the
`TextLayoutCache` when calling `layout` for `Text` elements.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2023-10-06 13:18:56 -04:00
Nathan Sobo
3ba8857491 Checkpoint 2023-09-11 12:58:55 -06:00
Nathan Sobo
e0fdc7d0aa Eliminate PaintContext 2023-09-11 09:00:59 -06:00
Nathan Sobo
ebf8b32811 Checkpoint 2023-09-08 16:25:10 -06:00
Nathan Sobo
c3b1264c05 Checkpoint 2023-09-08 14:09:29 -06:00