Commit Graph
432 Commits
Author SHA1 Message Date
Antonio Scandurra 57f3a882fe Render disconnected overlay when project becomes readonly 2023-12-20 14:10:59 +01:00
Antonio Scandurra 390ccbc6ad Disable focus when disconnecting from host 2023-12-20 14:10:56 +01:00
Antonio Scandurra 5781cf6604 Use InteractiveBounds everywhere we change the cursor style 2023-12-20 13:59:52 +01:00
Max Brunsfeld c81e89a4f4 Ensure that new view observers are called by WindowContext::replace_root_view 2023-12-19 17:04:42 -08:00
Marshall Bowers 53b76e3e4d Style pane drop targets (#3726)
This PR styles the pane drop targets using the `drop_target_background`
color from the theme.

We do have to adjust the alpha channel of the color so that it doesn't
obscure the contents of the buffer.

Release Notes:

- N/A
2023-12-19 18:06:21 -05:00
Marshall Bowers 547ad77243 Style tab drop targets for project entries (#3725)
This PR styles the drop targets when dragging a project entry onto a tab
or the tab bar.

I also adjusted the existing tab drop targets to use the
`drop_target_background` from the theme.

Release Notes:

- N/A
2023-12-19 17:45:42 -05:00
Kirill BulatovandAntonio Scandurra cf12d62fc5 Tidy up z-index handling
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-19 23:50:42 +02:00
825a8f0927 Initial fix of the z-index
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-12-19 23:29:08 +02:00
Marshall Bowers 7bc9319871 Apply padding at the toolbar level (#3720)
This PR adjusts the padding in the toolbar to be applied within the
toolbar itself.

Previously the different elements within the toolbar were applying their
own padding, which led to inconsistencies.

Release Notes:

- N/A
2023-12-19 16:01:03 -05:00
Max Brunsfeld e655d2434a Don't stop propagation on mouse move over editor gutter 2023-12-19 09:02:25 -08:00
Max Brunsfeld cf037ea4a8 Merge branch 'main' into fix-panel-resize 2023-12-19 08:55:55 -08:00
Marshall Bowers 3e6b84a726 Wire up the middle mouse button to close tabs (#3714)
This PR wires up the middle mouse button to close tabs.

Right now we're doing this using `on_mouse_down`, but we need a way in
GPUI2 to have an `on_click` for a mouse button other than the left one.

Release Notes:

- N/A
2023-12-19 11:26:55 -05:00
Antonio Scandurra ba0d7e35bb Set window edited 2023-12-19 10:26:06 +01:00
Max BrunsfeldandNathan Sobo e6f3731efd Fix position of right dock handle
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2023-12-18 16:05:54 -08:00
Marshall Bowers 64ceb61aa3 Add pane dividers (#3703)
This PR adds dividers between panes in a split.

Release Notes:

- N/A
2023-12-18 16:32:51 -05:00
Nate Butler a286ec4650 Update toolbar.rs 2023-12-18 16:10:13 -05:00
Nate Butler 9cd8e99a9a Update toolbar.rs 2023-12-18 14:10:12 -05:00
Nate Butler 2ae39b70c8 Add left side padding 2023-12-18 13:55:30 -05:00
Nate Butler c9893ce2fd Use flex_1 div instead of justify_center in toolbar 2023-12-18 13:51:04 -05:00
Julia 4707248714 Revert accidental merge of old version of workspace2 render function (#3694)
Something happened with my local diff and
https://github.com/zed-industries/zed/pull/3691 somehow contained an old
version of workspace2's render function. Perhaps I rebased at some point
and borked it? Not sure 🤷‍♀️

Release Notes:

- N/A
2023-12-18 11:32:06 -05:00
Julia 488073deba Unbork project search focus (#3691)
I got a little too clever for my own good with these focus handles
originally lol

Release Notes:

- N/A
2023-12-18 10:54:11 -05:00
Julia b4042feccd Unbork project search focus 2023-12-18 10:44:34 -05:00
Max Brunsfeld a4cdf365be Fix accidental drop of following task. Add back FollowNextCollaborator 2023-12-15 16:15:31 -08:00
Max Brunsfeld a5e037befa Avoid duplicate render of a pane when it is zoomed 2023-12-15 13:26:48 -08:00
Max Brunsfeld e3e988c150 Always render panes via pane_group::Member::render
Remove distinct code path for rendering panes in a PaneAxis, as this dropped
the logic for rendering the leader border and info box.
2023-12-15 13:26:36 -08:00
Max Brunsfeld 4eb609a954 Enable zoom (#3668)
* [x] zoom
* [x] pane tests
2023-12-15 12:58:03 -08:00
Max Brunsfeld 4c3ec0a8e5 Enable pane tests 2023-12-15 12:00:58 -08:00
Max Brunsfeld 9a8225c855 When a dock is zoomed, don't render it in its normal place 2023-12-15 11:48:25 -08:00
Max Brunsfeld a4c123bb11 Fix logic for activating panel when re-docking it 2023-12-15 11:47:01 -08:00
Marshall Bowers b1a61ca21e Fix toolbar width (#3681)
This PR fixes an issue with the toolbar width introduced in #3666.

The lack of a flex container was making the toolbar contents not take up
the full width, and thus not positions items correctly along its main
axis.

Release Notes:

- N/A
2023-12-15 14:44:29 -05:00
Max Brunsfeld 793381f455 Render zoomed item in the workspace 2023-12-15 11:19:59 -08:00
Mikayla a2852e36ce Fix pane resizing 2023-12-15 10:07:10 -08:00
Julia 4be84f3db0 Merge branch 'main' into focus-handlers-on-draw 2023-12-14 23:08:23 -05:00
Julia fbcaf96ab5 Track focus on TestItem 2023-12-14 20:58:59 -05:00
Max Brunsfeld 52b9fc303b Fix overlay rendering when dragging onto the center of a pane 2023-12-14 16:52:03 -08:00
Mikayla Maki c27dd57a48 Make more performance improvements to GPUI 2 (#3664)
In the 3 charts below, "window draw" has 3 major subroutines. Request
layout, where we walk over the tree and have everything talk to the
layout engine initially. Compute layout, where we have the layout engine
actually do the layout, and then paint, where we use the computed bounds
to populate the scene.


![image_720](https://github.com/zed-industries/zed/assets/1789/d2225389-865f-4c8a-9452-9f611da64dcf)

Things are moving quickly so before/after comparisons are tough. In the
graph above, green bars are from a commit actually pre-dates a merge of
master which increased the complexity of layout. The red bars represent
the state of the world after this PR. Note how we improve the
performance of `paint`.

Improvements:

- Not moving `self` in `Element::paint`. This was moving from the heap
to the stack and imposing a big cost. This is the biggest win in this
PR.
- We got some minor wins by making the stacking order a bigger smallvec
of u8 instead of u32.
- A big win that doesn't show up in this chart is avoiding a double
render of the editor when autoscrolling by never pushing notification
effects or marking the window dirty when notifying during a window draw.

Release Notes:

- N/A
2023-12-14 16:45:58 -08:00
Mikayla Maki 05cb68eff1 Merge branch 'main' into perf-2 2023-12-14 16:39:10 -08:00
Max Brunsfeld 842f15c65b Fix centering of empty pane text 2023-12-14 16:35:58 -08:00
Mikayla Maki 8418f25d0a Merge branch 'main' into perf-2 2023-12-14 16:25:40 -08:00
Max Brunsfeld d6383ab0c6 Fix stickiness of main pane drag target
Reimplement the pane drag targets using on_drag_move
2023-12-14 16:23:15 -08:00
Mikaylaandconrad 8b4cf38379 Fix dock resize handles
co-authored-by: conrad <conrad@zed.dev>
2023-12-14 16:05:10 -08:00
Nathan Sobo 02606d1fb9 Merge remote-tracking branch 'origin/main' into perf-2 2023-12-14 16:56:36 -07:00
Max Brunsfeld fcbd58fed4 Enable all warnings in workspace, fix all warnings (#3660) 2023-12-14 14:38:28 -08:00
Max BrunsfeldandConrad 6170895932 Fix bug in Workspace::activate_pane_in_direction
Co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 14:27:44 -08:00
Max Brunsfeld b5e9e277db Re-enable cmd-<number> key bindings for activating panes (#3659) 2023-12-14 14:16:43 -08:00
Max BrunsfeldandConrad 23d5f3f3e8 Enable all warnings in workspace, fix all warnings
Bring back some workspace tests

Co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 14:15:56 -08:00
Nathan Sobo d13a21c238 Don't move in paint 2023-12-14 15:15:18 -07:00
Julia bbbdb9ff3e Render panel in this test to make sure it can receive focus 2023-12-14 17:11:00 -05:00
Max Brunsfeld 8d994ce8c5 Enable dragging from project panel to panes (#3658)
Rework gpui2 drag API so that receivers need not specify the dragged
view type.
2023-12-14 13:32:40 -08:00
Max BrunsfeldandConrad 6b06bb4ffe Re-enable cmd-<number> key bindings for activating panes
co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 13:30:11 -08:00