Commit Graph

86 Commits

Author SHA1 Message Date
Antonio Scandurra
b9ed327b94 Replace usages of is_parent_view_focused with is_self_focused
Previously, this was used because we didn't have access to the current
view and `EventContext` was an element-only abstraction. Now that the
`EventContext` wraps the current view's `ViewContext` we can simply check
for the view's focus and avoid querying ancestors.
2023-05-05 10:08:22 +02:00
Antonio Scandurra
80ad59a620 Make focusing the parent an effect to avoid querying ancestors 2023-05-05 10:04:54 +02:00
Antonio Scandurra
da19edc3e3 Merge branch 'main' into implicit-ancestry 2023-05-04 14:39:58 +02:00
Antonio Scandurra
3d679ddb26 Avoid re-allocating KeymapContext after every view notification 2023-05-04 12:04:30 +02:00
Antonio Scandurra
e9ed40da37 Remove the ability to retrieve the view's parent 2023-05-03 16:52:55 +02:00
Antonio Scandurra
7f137ed3dd Compute view ancestry at layout time 2023-05-03 16:36:14 +02:00
Antonio Scandurra
7f345f8bf5 Separate Window::build_scene into layout and paint 2023-05-03 12:18:16 +02:00
Antonio Scandurra
c4472b0786 Remove ViewContext::dispatch_action 2023-05-01 16:27:36 +02:00
Antonio Scandurra
1d41a703ad Remove internal actions from terminal_button 2023-04-28 17:29:17 +02:00
Antonio Scandurra
e1535735b8 Remove DeployContextMenu internal action 2023-04-28 16:51:01 +02:00
Antonio Scandurra
5521ff1b22 Allow passing a handler function to context menu items 2023-04-27 11:32:12 +02:00
Antonio Scandurra
2b6830c798 Remove unnecessary calls to WeakViewHandle::upgrade 2023-04-26 11:13:46 +02:00
Antonio Scandurra
94c2eaad23 Replace ViewContext::spawn with ViewContext::spawn_weak 2023-04-26 10:23:27 +02:00
Max Brunsfeld
ebbe52e6b0 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
Max Brunsfeld
abdccf7393 Use a workspace dependency for the futures crate 2023-04-24 09:43:31 -07:00
Mikayla Maki
8e0d359c63
Merge branch 'main' into fix-nondeterministic-terminal-test 2023-04-22 11:17:06 +12:00
Mikayla Maki
d841c3729b Wire through the gutter, rather than implicitly adding it 2023-04-21 16:12:33 -07:00
Nathan Sobo
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
Antonio Scandurra
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
f54a289b6f Remove handle to view from TerminalElement
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-21 16:56:06 +02:00
Antonio Scandurra
5b40641fde Take a target view when marking an element as draggable 2023-04-21 15:52:05 +02:00
Antonio Scandurra
c76b9794e4 Merge branch 'main' into window_context_2 2023-04-21 10:58:08 +02:00
Mikayla Maki
f54ab73b47
Merge branch 'main' into finally-fix-terminal-line-height 2023-04-21 12:26:32 +12:00
Mikayla Maki
dfdc826015 Create a new setting to adjust the line height in the terminal 2023-04-20 17:24:27 -07:00
Max Brunsfeld
32c57bcd22 Store buffer's diagnostic sets in a smallvec 2023-04-20 08:58:41 -07:00
Antonio Scandurra
c52b6328b7 Merge branch 'main' into window_context_2 2023-04-20 16:01:47 +02:00
Joseph Lyons
9afd804062 Remove unnecessary lifetimes from tab_tooltip_text 2023-04-18 14:03:02 -04:00
Antonio Scandurra
d03c431f9a Fix warnings/errors now that AsyncAppContext::update returns Result 2023-04-18 14:58:57 +02:00
Joseph Lyons
ebe57254e0 Add tab tooltips 2023-04-15 06:46:14 -04:00
Antonio Scandurra
7394bf1cdc Fix most of the warnings 2023-04-14 10:51:53 +02:00
Nathan Sobo
25ad635577 WIP 2023-04-12 12:38:26 -06:00
Nathan Sobo
a25f962185 WIP 2023-04-12 12:13:35 -06:00
Nathan Sobo
868301bedb WIP 2023-04-12 10:07:17 -06:00
Antonio Scandurra
83070a19c4 WIP 2023-04-12 15:55:43 +02:00
Nathan Sobo
b54f08db77 WIP 2023-04-12 06:51:03 -06:00
Nathan Sobo
e115baa60c WIP 2023-04-11 18:21:56 -06:00
Nathan Sobo
2615a11f7c Don't export platform::* from gpui
I'd like to avoid cluttering the top-level namespace with all the platform-
specific types.
2023-04-07 11:45:53 -06:00
Nathan Sobo
8136d8a8a6 Fix formatting 2023-04-06 15:54:44 -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
Nathan Sobo
82a713fd1d Store AnyViewHandle inside ViewHandle and Deref to it 2023-04-02 14:59:55 -06:00
Mikayla Maki
ae3b3ea458 Merge branch 'main' into copilot 2023-03-29 16:57:38 -07:00
Julia
737e2e1b3c Open symbol outline when clicking on editor breadcrumbs 2023-03-29 15:46:43 -04:00
Antonio Scandurra
5471217089 Use the same serde version across the entire workspace 2023-03-28 09:42:00 -07:00
Petros Amoiridis
bd1515cdd2
Only show count when we have terminals
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-03-22 18:23:41 +02:00
Petros Amoiridis
15406ff2d9
Remove comment 2023-03-22 16:31:42 +02:00
Petros Amoiridis
d5bb2d13b8
Introduce terminal button count
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-03-22 16:13:58 +02:00
Antonio Scandurra
1af8f4be19 Deserialize Theme directly into the heap to avoid stack overflow
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-03-17 15:58:52 +01:00
Antonio Scandurra
786d95b8c8 Avoid storing fonts::Features in TextStyle
We were only using it for debugging purposes and that was causing
the `Theme` struct to become too big to hold on the stack.

Co-Authored-By: Julia Risley <julia@zed.dev>
2023-03-17 15:12:02 +01:00
Antonio Scandurra
4d915f4530 Don't make fonts::Features Copy 2023-03-17 13:54:56 +01:00
Antonio Scandurra
7d13b00914 Allow setting font features on the terminal as well 2023-03-17 11:42:24 +01:00