Nathan Sobo
bd121d7e9e
WIP
2021-08-22 11:58:19 -06:00
Nathan Sobo
d4b20491fb
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
174ead146a
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
2f5f0a4f96
WIP
2021-08-20 16:34:46 -06:00
Nathan Sobo
9f69d8ce2b
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 Antonio Scandurra
a180016f1c
Make titlebar_height available during render
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-08-20 10:45:42 -07:00
Max Brunsfeld and Antonio Scandurra
2f58c18ab4
Make the default window size non-zero
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-08-20 10:01:24 -07:00
Max Brunsfeld
f054d6e93b
Merge remote-tracking branch 'origin/sexy' into chat-theme-prep
2021-08-20 09:50:58 -07:00
Antonio Scandurra and Nathan Sobo
555d5132b7
Make database interactions deterministic in test
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-20 16:24:33 +02:00
Nathan Sobo
7387633ec0
Fetch messages when joining a channel
2021-08-19 15:25:20 -06:00
6fd84b40b3
Start on subscribing to messages in channel entity instances
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-08-18 11:45:29 -06:00
Nathan Sobo
2af09d650a
Expose titlebar_height in LayoutContext
2021-08-06 09:11:16 -06:00
Nathan Sobo
6d6274ac8e
Add platform::Window::titlebar_height
2021-08-06 09:08:29 -06:00
Nathan Sobo
56996aaefa
Start on custom titlebar
2021-08-05 11:48:35 -06:00
Max Brunsfeld and Nathan Sobo
df9200c1ac
Improve border parsing in themes
...
The `top`, `left`, `bottom` and `right` fields are optional.
If none are specified, then they are all set to true.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-04 17:19:42 -07:00
Nathan Sobo
26cbd05668
Merge branch 'main' into theme-variables
2021-08-04 16:47:43 -06:00
Max Brunsfeld and Nathan Sobo
662e76d3bc
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
Nathan Sobo and Max Brunsfeld
1b7c57daf3
Avoid crashes when laying out lines containing byte order marks
...
This solution isn't perfect and we'll probably have layout bugs with these lines, but this prevents us from triggering undefined behavior.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-08-04 11:52:21 -06:00
Nathan Sobo and Max Brunsfeld
37cc3aabf9
Implement themes::ThemeRegistry::get
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-08-03 19:35:15 -06:00
Max Brunsfeld
03bcb5fa11
Restructure Theme with new style objects
2021-08-03 13:36:58 -07:00
Max Brunsfeld and Nathan Sobo
51d1664122
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
9f279062db
Extract {Container,Label}Style structs from those elements
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-03 11:07:03 -07:00
Nathan Sobo
9087dd6965
Notify all views when a theme is selected
2021-08-02 16:57:10 -06:00
Max Brunsfeld and Nathan Sobo
5532f60e2f
Add a theme picker
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-02 14:55:27 -07:00
Max Brunsfeld and Nathan Sobo
8c27ccacce
Remove use of replace_with crate for managing element lifecycles
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-08-02 13:11:11 -07:00
Max Brunsfeld
ed15275a88
Use deterministic executor in randomized synchronous tests
...
Remove App::test function
2021-07-30 14:07:37 -07:00
Max Brunsfeld
a53b742b4e
Fix type of Workspace::open_new_file context parameter
...
Fixes #118
2021-07-30 10:11:46 -07:00
Max Brunsfeld
85fdc91e47
Extract most colors in codebase into theme file. switch to dark
2021-07-30 09:50:28 -07:00
Nathan Sobo and Antonio Scandurra
b6e235be86
Reuse FontCache across randomized tests
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-07-30 09:50:28 -07:00
Antonio Scandurra
8b6a9c5046
Make WrapMap and DisplayMap models
...
This removes the need for a lock around in `WrapMap` and also removes
`WrapMap::notifications` because gpui already has a standard way of
notifying when a model updates.
2021-07-26 13:02:31 +02:00
Nathan Sobo
ed7e09f5b3
WIP
2021-07-23 12:25:09 -06:00
eb1cfd8db3
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
Antonio Scandurra
e93eed360f
Don't poll foreground futures during DeterministicExecutor::block_on
2021-07-23 12:06:58 +02:00
Max Brunsfeld and Nathan Sobo
ebc986a0e2
Start restructuring WrapMap with simpler concurrency
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-22 16:21:42 -07:00
Max Brunsfeld
c4d825cf33
Get simple unit test passing for soft-wrap in DisplayMap
2021-07-20 15:22:11 -07:00
Max Brunsfeld and Nathan Sobo
e8d2dda42f
Avoid holding executor's state lock while parked
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-20 11:37:02 -07:00
Nathan Sobo and Max Brunsfeld
31d248318a
Replace DeterministicExecutor::reset with forbid_parking
...
There's really no point calling reset if we plan on parking afterwards.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-20 12:28:04 -06:00
Nathan Sobo
e438010a18
Allow DeterministicExecutor to park until forbid_parking is called
...
This allows us to perform async setup such as talking to the database.
2021-07-20 12:22:02 -06:00
7efff39465
Add DeterministicExecutor::block_on(duration, future)
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-07-20 19:20:50 +02:00
Max Brunsfeld and Nathan Sobo
277b64a5f0
Start work on WrapMap::chunks_at
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-19 16:23:56 -07:00
Nathan Sobo
2cc93834d8
WIP
2021-07-19 13:59:07 -06:00
Max Brunsfeld
51320e815c
Implement FontSystem::wrap_line
2021-07-16 17:14:43 -07:00
Antonio Scandurra
53311059e1
WIP
2021-07-16 18:43:50 +02:00
Antonio Scandurra and Nathan Sobo
34cda642ae
Start on adding a randomized test for BackgroundWrapper
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-16 17:53:23 +02:00
4634097115
Use an unbounded channel for waking executor::Deterministic
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-07-13 18:46:48 +02:00
bf172f29f2
Use the same background executor for spawning CPU intensive tasks
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-07-13 18:13:25 +02:00
Antonio Scandurra
5e6952fa71
Use an executor::Background in AppContext::thread_pool
2021-07-13 14:06:38 +02:00
Antonio Scandurra
350e3f03fb
Allow printing a trace of a run of the executor
2021-07-13 12:31:36 +02:00
Antonio Scandurra and Nathan Sobo
0f5a507da1
Ensure root view is always rendered when opening a window
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-12 17:44:10 +02:00
Antonio Scandurra
2a03d86543
Allow resetting executor::Deterministic's RNG
2021-07-11 11:26:06 +02:00