Nathan Sobo
5d614e7e54
Fix test assertions
2021-05-21 14:36:52 -06:00
Nathan Sobo
92ff7f4e5e
Accept colors in styling runs passed to layout_str
...
Also move from the runs being expressed as ranges to the runs being expressed as a sequence of contiguous scalar lengths.
2021-05-21 14:10:38 -06:00
Antonio Scandurra
608336c279
Complete unit test for Label highlights
2021-05-20 12:47:08 +02:00
Max Brunsfeld
558ce41130
WIP - Adjust Label element to expect highlights as byte offsets
2021-05-20 12:47:08 +02:00
Max Brunsfeld
92b938f4a8
Adjust layout_str
to use byte coordinates
...
* Interpret ranges as byte ranges for incoming runs
* Return glyphs whose indices are byte offsets
2021-05-20 12:47:08 +02:00
Nathan Sobo
b5463dcd1e
Close tabs when X is clicked
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-28 10:00:45 -06:00
Nathan Sobo
69cc2b0483
WIP
2021-04-27 18:35:24 -06:00
Nathan Sobo
eca9f495a1
Render a close tab button on tab hover
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-04-27 11:58:59 -06:00
Nathan Sobo
bb95d58c79
Relay hover events to tabs
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-04-27 11:37:14 -06:00
Nathan Sobo
3d1e44ca29
Capture hover events on tabs
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-27 09:23:44 -06:00
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