Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Checkpoint
Antonio Scandurra61490fbaa8ac
diff --git a/crates/gpui3/src/element.rs b/crates/gpui3/src/element.rsindex 06cc7ff6cae..b9c42721d17 100644--- a/crates/gpui3/src/element.rs+++ b/crates/gpui3/src/element.rs@@ -1,4 +1,4 @@-use crate::{BorrowWindow, Bounds, ElementId, LayoutId, Pixels, Point, SharedString, ViewContext};+use crate::{BorrowWindow, Bounds, ElementId, LayoutId, Pixels, Point, ViewContext};use derive_more::{Deref, DerefMut};pub(crate) use smallvec::SmallVec;@@ -48,7 +48,6 @@ impl ElementIdentity for AnonymousElement {pub trait ParentElement: Element {fn children_mut(&mut self) -> &mut SmallVec<[AnyElement<Self::ViewState>; 2]>;- fn group_mut(&mut self) -> &mut Option<SharedString>;fn child(mut self, child: impl IntoAnyElement<Self::ViewState>) -> Selfwherediff --git a/crates/gpui3/src/elements/div.rs b/crates/gpui3/src/elements/div.rsindex 43034787ff7..0838183976d 100644--- a/crates/gpui3/src/elements/div.rs+++ b/crates/gpui3/src/elements/div.rs@@ -2,7 +2,8 @@ use crate::{AnonymousElement, AnyElement, AppContext, BorrowWindow, Bounds, Clickable, DispatchPhase,Element, ElementId, ElementIdentity, IdentifiedElement, Interactive, IntoAnyElement, LayoutId,MouseClickEvent, MouseDownEvent, MouseEventListeners, MouseMoveEvent, MouseUpEvent, Overflow,- Pixels, Point, ScrollWheelEvent, SharedString, Style, StyleRefinement, Styled, ViewContext,+ ParentElement, Pixels, Point, ScrollWheelEvent, SharedString, Style, StyleRefinement, Styled,+ ViewContext,};use collections::HashMap;use parking_lot::Mutex;@@ -112,18 +113,6 @@ where}}-impl<V, K> Interactive for Div<V, K>-where- V: 'static + Send + Sync,- K: ElementIdentity,-{- fn listeners(&mut self) -> &mut MouseEventListeners<V> {- &mut self.listeners- }-}--impl<V> Clickable for Div<V, IdentifiedElement> where V: 'static + Send + Sync {}-impl<V, K> Div<V, K>whereV: 'static + Send + Sync,@@ -430,6 +419,16 @@ where}}+impl<V, K> ParentElement for Div<V, K>+where+ V: 'static + Send + Sync,+ K: ElementIdentity,+{+ fn children_mut(&mut self) -> &mut SmallVec<[AnyElement<Self::ViewState>; 2]> {+ &mut self.children+ }+}+impl<V, K> Styled for Div<V, K>whereV: 'static + Send + Sync,@@ -440,6 +439,18 @@ where}}+impl<V, K> Interactive for Div<V, K>+where+ V: 'static + Send + Sync,+ K: ElementIdentity,+{+ fn listeners(&mut self) -> &mut MouseEventListeners<V> {+ &mut self.listeners+ }+}++impl<V> Clickable for Div<V, IdentifiedElement> where V: 'static + Send + Sync {}+fn paint_hover_listener<V>(bounds: Bounds<Pixels>, cx: &mut ViewContext<V>)whereV: 'static + Send + Sync,