Antonio Scandurra and Nathan Sobo
bd89dc4114
Perform a full layout of List when width changes
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-23 16:04:23 +02:00
Antonio Scandurra and Nathan Sobo
03b7c3c8c6
Implement and test splice for ListState
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-23 16:00:05 +02:00
Antonio Scandurra and Nathan Sobo
6dddb72e82
WIP: Create infrastructure for testing element layout
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-23 15:20:23 +02:00
Nathan Sobo
030de803fe
WIP: Start on List::layout
...
Perform layout on any elements that we haven't yet laid out.
2021-08-21 13:40:45 -06:00
Nathan Sobo
d68e0b0b97
Remove after_layout from Element trait
...
Now that layout takes a MutableAppContext we don't need an after_layout phase.
2021-08-20 16:40:45 -06:00
Nathan Sobo
d0a5bc694c
WIP
2021-08-20 16:34:46 -06:00
Nathan Sobo
c3dda14490
WIP: Move sum_tree module into gpui so we can use it in List
2021-08-20 16:18:39 -06:00
Max Brunsfeld and Nathan Sobo
802f1f4e78
Get new theme structure working
...
* Fix precedence of extends directives
* Always group color with font properties for text theming
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-04 14:07:19 -07:00
Max Brunsfeld
81041d7841
Restructure Theme with new style objects
2021-08-03 13:36:58 -07:00
Max Brunsfeld and Nathan Sobo
ef0ffbe819
Use custom color wrapper type everywhere in gpui & zed
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-03 12:48:58 -07:00
Max Brunsfeld and Nathan Sobo
fa01273466
Extract {Container,Label}Style structs from those elements
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-03 11:07:03 -07:00
Max Brunsfeld and Nathan Sobo
b30d0daabf
Add a theme picker
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-02 14:55:27 -07:00
Max Brunsfeld
372d2ccb6d
Extract most colors in codebase into theme file. switch to dark
2021-07-30 09:50:28 -07:00
11285f3762
Pass a MutableAppContext to Element::layout and ::dispatch_event
...
We need to mutate the app in these cases to relay layout state, so this just makes things easier. We won't be able to perform layout in parallel but it's questionable whether we'll ever actually do that. If we do, we can revisit.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-23 10:52:08 -06:00
Max Brunsfeld
6ef447866a
Rename context parameters to cx in gpui
2021-05-28 15:32:35 -07:00
Max Brunsfeld and Nathan Sobo
139bcb8304
Rename foo/mod.rs files too foo.rs
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-05-28 14:41:58 -07:00
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 and Antonio Scandurra
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 and Max Brunsfeld
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 and Max Brunsfeld
bb95d58c79
Relay hover events to tabs
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-04-27 11:37:14 -06:00
Nathan Sobo and Antonio Scandurra
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 and Nathan Sobo
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 and Nathan Sobo
09f5c7c23e
Fix scrollwheel events in uniformlist
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-04-26 15:53:38 -07:00
Max Brunsfeld and Nathan Sobo
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 and Nathan Sobo
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 and Nathan Sobo
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 and Nathan Sobo
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 and Nathan Sobo
a9c428ad05
Remove Overdraw
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-03-31 17:58:43 +02:00
Antonio Scandurra and Nathan Sobo
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 and Nathan Sobo
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 and Nathan Sobo
859c0f53cb
WIP: Introduce layers in renderer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-03-22 18:55:53 +01:00