Center dock resize handle hitboxes (#9225)

Also, add a `deferred` function which takes an element to paint after
the current element tree.

Release Notes:

- Improved the size and position of the hitbox for resizing left, right,
and bottom panels.
([#8855](https://github.com/zed-industries/zed/issues/8855))

Co-authored-by: Julia <julia@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2024-03-12 15:42:18 +01:00 committed by GitHub
parent 409aa513d4
commit 39a0841ea8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 88 additions and 25 deletions

View file

@ -381,8 +381,7 @@ impl<'a> ElementContext<'a> {
let mut sorted_deferred_draws =
(0..self.window.next_frame.deferred_draws.len()).collect::<SmallVec<[_; 8]>>();
sorted_deferred_draws
.sort_unstable_by_key(|ix| self.window.next_frame.deferred_draws[*ix].priority);
sorted_deferred_draws.sort_by_key(|ix| self.window.next_frame.deferred_draws[*ix].priority);
self.layout_deferred_draws(&sorted_deferred_draws);
self.window.mouse_hit_test = self.window.next_frame.hit_test(self.window.mouse_position);