Max Brunsfeld
cf037ea4a8
Merge branch 'main' into fix-panel-resize
2023-12-19 08:55:55 -08:00
Antonio Scandurra
dd84993d76
Maintain scroll position in CollabPanel after updating entries
...
Co-Authored-By: Julia <julia@zed.dev>
2023-12-19 16:06:00 +01:00
Antonio Scandurra
02e53025f3
Track caller on h_stack and v_stack
2023-12-19 14:26:30 +01:00
Antonio Scandurra
ae32706cfe
Fix tests
2023-12-19 11:04:32 +01:00
Antonio Scandurra
ba0d7e35bb
Set window edited
2023-12-19 10:26:06 +01:00
Max Brunsfeld
2979eb9da9
Allow transparent divs to be considered "top layers"
...
This changes the meaning of `was_top_layer` so that it is checking that
nothing opaque is on top of the given layer. The layer in question
need not be opaque.
2023-12-18 18:32:08 -08:00
Max Brunsfeld
b88370d5ad
Respect a div's own z-index when adding its event listeners
2023-12-18 18:02:19 -08:00
Max Brunsfeld
ee8e1454fc
Fix drag and drop logic in div's mouse handling
...
* Attach mouse up and mouse move listeners immediately, not just when there
is already a drag in progress, because when starting a drag, these other
events may fire before the next frame.
* Remove bounds checks for handling mouse move and mouse events, since a
dragged object may be moved outside of its original container.
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2023-12-18 16:17:56 -08:00
Max Brunsfeld
0000e68310
Remove unused Arena::sized method
2023-12-18 10:41:02 -08:00
Antonio Scandurra
37efe82c5e
Use a different frame arena for all elements
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-12-18 19:35:17 +01:00
Antonio Scandurra
cef9aa3590
Use a different frame arena for each window
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-12-18 18:58:40 +01:00
Antonio Scandurra
4e544545d1
Introduce an Arena
to allocate and deallocate frame-related structs more cheaply ( #3689 )
...
Picture worth a thousand words:

Note how having an area makes a substantial amount of frames between
0.5ms and 1ms faster (15-20% faster frames).
Release Notes:
- N/A
2023-12-18 11:16:07 +01:00
Antonio Scandurra
5a4e2e6b90
Use a closure to allocate structs onto the Arena
...
This is a trick borrowed from Bumpalo that helps LLVM understand
it should instantiate the object directly on the heap, as opposed to
doing so on the stack and then moving it.
2023-12-18 10:56:37 +01:00
Marshall Bowers
54eb452144
Only apply scroll correction in uniform_list
when already scrolled ( #3687 )
...
This PR fixes an issue where the scroll correction added to the uniform
list in a35fdf45fc
was being applied even
if the list wasn't scrolled at all.
This manifested in the project panel starting with an incorrect scroll
offset that would disappear once scrolled.
It seems like we should only need to apply this scroll correction when
the list is already scrolled.
Release Notes:
- N/A
2023-12-15 17:53:10 -05:00
Max Brunsfeld
149a718d65
Don't scroll List on scroll wheel events outside of its bounds
2023-12-15 13:38:49 -08:00
Conrad Irwin
b8cdcf4e93
fix theme selector gaps ( #3682 )
...
- Don't scroll beyond end of uniform list
- Restore position of uniform_list padding
[[PR Description]]
Release Notes:
- N/A
2023-12-15 13:27:17 -07:00
Nathan Sobo
3781626379
Merge branch 'main' into arena
2023-12-15 13:22:19 -07:00
Conrad Irwin
2fe9a1df21
Restore position of uniform_list padding
...
It should be inside the scrollable area.
2023-12-15 13:18:51 -07:00
Conrad Irwin
a35fdf45fc
Don't scroll beyond end of uniform list
2023-12-15 12:54:12 -07:00
Marshall Bowers
a40f04b71f
Only scroll enough to reveal the next channel if it isn't visible
...
Co-authored-by: Max <max@zed.dev>
2023-12-15 13:50:51 -05:00
Marshall Bowers
47fc03ab98
Fix positioning of the inline context menu
...
Added a new `bounds_for_item` for `ListState`.
Co-authored-by: Max <max@zed.dev>
2023-12-15 13:24:30 -05:00
Antonio Scandurra
0a57171066
Use a safe API for Arena
2023-12-15 19:03:37 +01:00
Antonio Scandurra
be73dd852d
Move Arena
to a thread-local and use it to allocate AnyElement
2023-12-15 16:18:05 +01:00
Antonio Scandurra
e1ca8e81bb
Use an Arena to reuse allocations for listeners
2023-12-15 15:13:32 +01:00
Kirill Bulatov
a6403aad1a
Remove extra nits, do not panic on clicking the buffer separator
2023-12-15 11:28:48 +02:00
Julia
de523c2d80
Give correct focus handle when project search has no matches
2023-12-14 23:49:44 -05:00
Julia
4be84f3db0
Merge branch 'main' into focus-handlers-on-draw
2023-12-14 23:08:23 -05:00
Mikayla Maki
05cb68eff1
Merge branch 'main' into perf-2
2023-12-14 16:39:10 -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
Mikayla Maki
0b4b81fa0c
Fix dock resizing ( #3663 )
...
This fixes some bugs in the display and tracking of dock resizes
Release Notes:
-
2023-12-14 16:20:29 -08:00
Nathan Sobo
ad8165ae79
Rename draw2 -> draw_and_update_state
2023-12-14 17:20:27 -07:00
Nathan Sobo
f4a954db4f
Merge remote-tracking branch 'origin/main' into perf-2
2023-12-14 17:15:44 -07:00
Mikayla
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
Marshall Bowers
bc3e6649f8
Fix warning in release mode ( #3662 )
...
This PR fixes a warning that was present in release mode, which was
preventing the nightly builds from running:
```
error: variable does not need to be mutable
--> crates/gpui2/src/elements/div.rs:547:9
|
547 | let mut div = Div {
| ----^^^
| |
| help: remove this `mut`
|
= note: `-D unused-mut` implied by `-D warnings`
```
Release Notes:
- N/A
2023-12-14 18:52:14 -05:00
Mikayla
4c63c74f92
Fix bug in drag move dispatch
...
co-authored-by: conrad <conrad@zed.dev>
2023-12-14 15:23:24 -08:00
Max Brunsfeld
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
Mikayla
8791f7cefc
Enable dragging from project panel to panes
...
Rework gpui2 drag API so that receivers need not specify the dragged view type.
co-authored-by: Max <max@zed.dev>
co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 13:20:48 -08:00
Nathan Sobo
fb3382bcc5
Merge remote-tracking branch 'origin/main' into perf-2
2023-12-14 14:16:59 -07:00
Nathan Sobo
0dd6c50a20
Use FxHashMap for element state
2023-12-14 14:06:19 -07:00
Nathan Sobo
3d1dae9a06
Make z_indices bigger in StackingOrder
2023-12-14 11:37:48 -07:00
Nathan Sobo
0d30b698a4
Don't allocate interactive bounds
2023-12-14 11:28:52 -07:00
Nathan Sobo
1ae25f52a1
WIP
2023-12-14 10:31:45 -07:00
Conrad Irwin
c2c7eead8a
Robustify checks for visibility
2023-12-14 10:02:54 -07:00
Conrad Irwin
17a80ca09b
Ignore invisible layers for mouse events
2023-12-14 09:44:04 -07:00
Nathan Sobo
6f17cf7337
WIP
2023-12-14 09:25:14 -07:00