From fedb787b4fe6b96f509b160964a2a59eb87465e7 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 13 Oct 2023 19:05:51 +0200 Subject: [PATCH] WIP --- crates/gpui3/src/elements/nested.rs | 139 +++++++++++++++++- crates/gpui3/src/geometry.rs | 6 +- crates/gpui3/src/styled.rs | 5 +- .../src/derive_refineable.rs | 102 ++++++++++++- crates/refineable/src/refineable.rs | 16 +- 5 files changed, 239 insertions(+), 29 deletions(-) diff --git a/crates/gpui3/src/elements/nested.rs b/crates/gpui3/src/elements/nested.rs index 66a55b3a79..ccfe5fb4c2 100644 --- a/crates/gpui3/src/elements/nested.rs +++ b/crates/gpui3/src/elements/nested.rs @@ -1,6 +1,13 @@ -use crate::{AnyElement, Element, IntoAnyElement, Style, StyleCascade, StyleRefinement}; -use refineable::Refineable; +use crate::{ + group_bounds, AnyElement, DispatchPhase, Element, IntoAnyElement, MouseMoveEvent, SharedString, + Style, StyleCascade, StyleRefinement, +}; +use refineable::CascadeSlot; use smallvec::SmallVec; +use std::sync::{ + atomic::{AtomicBool, Ordering::SeqCst}, + Arc, +}; trait LayoutNode { fn state(&mut self) -> &mut LayoutNodeState; @@ -28,6 +35,7 @@ trait LayoutNode { struct LayoutNodeState { style_cascade: StyleCascade, + computed_style: Option