Commit graph

31 commits

Author SHA1 Message Date
Nathan Sobo
fc4b7e2a2a Introduce MouseEventHandler
Still need to give elements the ability to re-render their parent view. Once that is in place, I think we can implement hoverable close tab buttons.
2021-04-26 21:52:18 -06:00
Max Brunsfeld
55fcc586bc Cancel outstanding fuzzy-matching calls before starting a new one
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-26 16:14:43 -07:00
Max Brunsfeld
09f5c7c23e Fix scrollwheel events in uniformlist
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-26 15:53:38 -07:00
Max Brunsfeld
3f71867af8 Improve styling of tabs
* Enforce a min width per tab
* Center the title within tab, regardless of icon
* Render icon over the top of the tab title
* Ensure there is always a fixed minimum amount of filler to the right of all tabs

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-14 15:14:46 -07:00
Max Brunsfeld
36699dc095 Avoid setting constrain min to infinity in Flex layout
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-14 15:14:46 -07:00
Max Brunsfeld
f5752969ab Include constraints in element tree JSON debug output
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-14 15:14:46 -07:00
Nathan Sobo
9f6f27f305 Order debug JSON and allow elements to be named; copy to clipboard 2021-04-07 21:54:14 -06:00
Nathan Sobo
0664321125 Add ability to debug element trees as JSON 2021-04-07 21:54:14 -06:00
Max Brunsfeld
187eb95b13 Throw a little between filename and modified icon
We probably need a primitive to right-align an element within
its parent, but I don't have strong opinions about how that
should be designed, so I'm just adding this as a temporary
measure so that the tabs won't look too ugly in the meantime.
2021-04-07 15:39:09 -07:00
Max Brunsfeld
dabd6abe37 Start work on displaying modified status in tabs 2021-04-06 14:37:21 -07:00
Max Brunsfeld
c632aab382 Vertically center linebox child element
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-06 13:03:19 -07:00
Antonio Scandurra
e0c43dac25 Implement SVG rendering 2021-04-06 13:46:33 +02:00
Nathan Sobo
995acefce5 Inset container contents to account for container border 2021-04-01 10:31:00 -06:00
Antonio Scandurra
e487aa5cbd Don't render glyphs located outside of BufferElement's bounds 2021-04-01 11:19:50 +02:00
Antonio Scandurra
a9c428ad05 Remove Overdraw
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-03-31 17:58:43 +02:00
Antonio Scandurra
d5a9bab4a0 Fix tabs layout
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-03-31 17:57:00 +02:00
Antonio Scandurra
61d4da9934 Introduce layer clipping 2021-03-26 10:28:05 +01:00
Antonio Scandurra
5439213199 Fix Empty sometimes returning an infinite size in layout
This commit also ensures that elements never report an infinite size by
adding a debug assertion in the `Lifecycle` element.
2021-03-26 09:46:53 +01:00
Antonio Scandurra
1cb987d489 Remove stray use of pathfinder_geometry 2021-03-25 18:19:20 +01:00
Antonio Scandurra
0f6927eb4b Re-export font_kit primitives from a new fonts module
...also, rename the old `fonts` to `font_cache`.
2021-03-25 10:58:33 +01:00
Antonio Scandurra
9178e91cc0 Extract platform-dependant FontSystem
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-03-24 16:51:28 +01:00
Antonio Scandurra
43abd96769 Apply padding correctly when painting Container's children 2021-03-23 10:59:35 +01:00
Nathan Sobo
66dcb73263 Respect margins when painting Container 2021-03-22 21:11:08 -06:00
Antonio Scandurra
859c0f53cb WIP: Introduce layers in renderer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-03-22 18:55:53 +01:00
Antonio Scandurra
bfc57cb4f6 Start on rendering shadows
This still doesn't work properly because shadows are rendered beneath
quads and we still don't have a layering mechanism.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-03-22 18:05:16 +01:00
Nathan Sobo
119aa452b6 Overhaul the entire element system
Now the Element trait is designed to be wrapped in a Lifecycle enum that gets placed inside an ElementBox. This allows the framework to store data on behalf of the Element implementation, such as sizes, bounds, and also implementation-specific LayoutState and PaintState types. This makes it easier to reason about which data is available in each Element method.
2021-03-21 20:54:23 -06:00
Nathan Sobo
046fe3fff9 Dispatch keystrokes and fix rerendering when window invalidated
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-03-21 11:38:23 -06:00
Nathan Sobo
f5df3681f8 Add file_finder module
Still need to wire up key bindings to make it toggle.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-03-21 10:50:07 -06:00
Nathan Sobo
d14c943150 Start on Scene 2021-03-19 13:31:25 -06:00
Nathan Sobo
23308e17a9 WIP on rebuilding with extracted UI framework 2021-03-18 13:13:31 -06:00
Nathan Sobo
356bc41752 WIP 2021-03-09 21:00:51 -07:00