Commit Graph
44 Commits
Author SHA1 Message Date
Nathan Sobo e0fdc7d0aa Eliminate PaintContext 2023-09-11 09:00:59 -06:00
Nathan Sobo a24d94cfda Eliminate LayoutContext 2023-09-11 08:47:00 -06:00
Nathan Sobo ebf8b32811 Checkpoint 2023-09-08 16:25:10 -06:00
Nathan Sobo 53a50b8df4 Move refreshing to window 2023-09-08 13:27:29 -06:00
Nathan Sobo 48d3e2d9b9 Move views_to_notify_if_ancestors_change to Window 2023-08-29 21:58:44 -06:00
Nathan Sobo 2e7356a53e Store new_parents on Window instead of layout context 2023-08-29 21:43:48 -06:00
Nathan Sobo 0bf607cd2d WIP 2023-08-10 10:26:48 -06:00
Nathan Sobo 480401d65d WIP 2023-07-27 18:23:23 -06:00
Nathan Sobo 0374bc66ce WIP 2023-07-26 12:54:23 -06:00
Nathan Sobo c48d8af204 Merge branch 'paint-context' into cells 2023-07-25 17:36:05 -06:00
Nathan Sobo 1b03c5d69c Pass PaintContext to Element::paint
I want to use this on another branch, but it's a sweeping change,
so this prepares the ground for it. This can always be reverted if
it doesn't work out.
2023-07-25 17:32:31 -06:00
Nathan Sobo df9c17176e WIP 2023-07-25 16:33:58 -06:00
Nathan Sobo 54a7419fa2 WIP 2023-07-24 23:27:14 -06:00
Kirill Bulatov 2d8c88ad73 Draw tabs with svg icons in editor code only 2023-05-08 19:36:51 +03:00
Kirill Bulatov f0a88b3337 Make invisibles display configurable 2023-05-08 19:36:51 +03:00
Kirill Bulatov ad731ea6d2 Draft invisibles' tabs display 2023-05-08 19:36:51 +03:00
Antonio Scandurra 7f345f8bf5 Separate Window::build_scene into layout and paint 2023-05-03 12:18:16 +02:00
Max Brunsfeld 8eb9c6563a Generalize Text element to let you add arbitrary scene primitives for runs of text 2023-04-27 13:58:06 -07:00
Max Brunsfeld 7960067cf9 Fix bug where Text element would wrap at the right glyph in the wrong run 2023-04-26 15:33:10 -07:00
Max Brunsfeld 1bbcff543b Add API for adding mouse regions within Text 2023-04-26 12:00:26 -07:00
Nathan SoboandMax Brunsfeld fe492eacbf Refine naming of element-related types and traits
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 13:06:37 -06:00
03619dfa55 Rename Drawable::boxed to into_element and make containers generic
Multi-element are now generic over any drawable child, which can be converted
into an element.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 12:43:19 -06:00
Antonio Scandurra f09e21aa93 WIP: force using (at least) a window context to update views 2023-04-14 17:08:13 +02:00
Antonio Scandurra 7394bf1cdc Fix most of the warnings 2023-04-14 10:51:53 +02:00
Nathan Sobo a25f962185 WIP 2023-04-12 12:13:35 -06:00
Nathan Sobo e115baa60c WIP 2023-04-11 18:21:56 -06:00
Nathan Sobo 3de8fe0f87 WIP 2023-04-10 17:27:47 -06:00
Nathan Sobo 7536645eea WIP 2023-04-08 08:01:05 -06:00
Nathan Sobo de9bf6dfbd Merge MutableAppContext into AppContext
There may have been a good reason for the difference at some point, or I was
still learning Rust. But now it's just &mut AppContext vs &AppContext.
2023-04-06 15:49:03 -06:00
Mikayla Maki b500ed3171 Changed label and text to be generic over static strings and owned strings 2023-02-21 16:47:29 -08:00
Nathan Sobo 12eab6551f Remove dispatch_event from Element trait 2022-10-16 13:08:25 -06:00
Antonio Scandurra f67e2bea29 Refresh windows when OS appearance changes 2022-09-14 11:47:43 +02:00
ForLoveOfCatsandMikayla 8ba2f77148 One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Antonio Scandurra 97ce3998ec Position IME input according to where the selection is rendered 2022-07-21 17:35:40 +02:00
Keith Simmons a477733bcb Address hover panic and add hint to install go when language server failed to install 2022-06-27 15:48:15 -07:00
Antonio Scandurra 01349e1d42 Fix panic when Text contained carriage returns 2022-06-23 10:21:21 +02:00
Antonio Scandurra 73f2fd6b09 Pass visible bounds to Element::dispatch_event 2022-04-07 15:10:09 +02:00
Antonio ScandurraandNathan Sobo 447f350123 Compute line-height as a multiple of font size
...instead of using the bounding box. This makes `PragmataPro` and other
fonts render more cleanly.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 16:35:06 +01:00
Antonio Scandurra fbf7cdf4f2 Make all HighlightStyle properties optional
Previously, some of those properties such the font weight, style and color
would be mandatory: when the theme didn't specify them, Zed would use a default
value during deserialization. This meant that those default properties would
unconditionally override the base text style, causing a rendering bug when
combining syntax highlights with diagnostic styles.

This commit fixes that by making `HighlightStyle`s more additive: each property
can be set independently and only the properties that theme specifies get
overridden in the base text style.
2022-03-15 10:39:43 +01:00
Nathan Sobo 3968b37e26 When renaming, fade out the old name and select all 2022-03-10 14:55:31 -07:00
Nathan Sobo ac1eb19f83 Start on text highlight support 2022-03-09 20:51:35 -07:00
Max Brunsfeld adeb7e6864 Incorporate syntax highlighting into symbol outline view
Still need to figure out how to style the fuzzy match characters
now that there's syntax highlighting. Right now, they are
underlined in red.
2022-01-13 18:10:02 -08:00
Antonio ScandurraandNathan Sobo 1875a0e349 Polish rendering of inline errors
- Don't soft-wrap
- Render multiple lines

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-06 16:17:53 +01:00
Nathan SoboandMax Brunsfeld fdfed3d7db Move all crates to a top-level crates folder
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-04 13:22:21 -06:00