Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Checkpoint
Nathan Sobod3916b84c93c
diff --git a/crates/gpui3/src/color.rs b/crates/gpui3/src/color.rsindex 58bbcb5db2a..1ace030482b 100644--- a/crates/gpui3/src/color.rs+++ b/crates/gpui3/src/color.rs@@ -146,6 +146,15 @@ pub fn black() -> Hsla {}}+pub fn white() -> Hsla {+ Hsla {+ h: 0.,+ s: 0.,+ l: 1.,+ a: 1.,+ }+}+impl Hsla {/// Returns true if the HSLA color is fully transparent, false otherwise.pub fn is_transparent(&self) -> bool {diff --git a/crates/gpui3/src/elements/text.rs b/crates/gpui3/src/elements/text.rsindex db94b96b774..b5f8fc5ec52 100644--- a/crates/gpui3/src/elements/text.rs+++ b/crates/gpui3/src/elements/text.rs@@ -39,8 +39,6 @@ impl<S: 'static> Element for Text<S> {_view: &mut S,cx: &mut ViewContext<S>,) -> Result<(LayoutId, Self::FrameState)> {- dbg!("layout text");-let text_system = cx.text_system().clone();let text_style = cx.text_style();let font_size = text_style.font_size * cx.rem_size();diff --git a/crates/gpui3/src/window.rs b/crates/gpui3/src/window.rsindex 58f06874823..605f1390bfb 100644--- a/crates/gpui3/src/window.rs+++ b/crates/gpui3/src/window.rs@@ -251,15 +251,11 @@ impl<'a, 'w> WindowContext<'a, 'w> {let (root_layout_id, mut frame_state) = root_view.layout(&mut (), cx)?;let available_space = cx.window.content_size.map(Into::into);- dbg!("computing layout");cx.window.layout_engine.compute_layout(root_layout_id, available_space)?;- dbg!("asking for layout");let layout = cx.window.layout_engine.layout(root_layout_id)?;- dbg!("painting root view");-root_view.paint(layout, &mut (), &mut frame_state, cx)?;cx.window.root_view = Some(root_view);let scene = cx.window.scene.take();@@ -277,13 +273,6 @@ impl<'a, 'w> WindowContext<'a, 'w> {}}-impl MainThread<WindowContext<'_, '_>> {- // todo!("implement other methods that use platform window")- fn platform_window(&self) -> &dyn PlatformWindow {- self.window.platform_window.borrow_on_main_thread().as_ref()- }-}-impl Context for WindowContext<'_, '_> {type EntityContext<'a, 'w, T: 'static + Send + Sync> = ViewContext<'a, 'w, T>;type Result<T> = T;diff --git a/crates/storybook2/src/workspace.rs b/crates/storybook2/src/workspace.rsindex c48993a9afd..1ffb536713e 100644--- a/crates/storybook2/src/workspace.rs+++ b/crates/storybook2/src/workspace.rs@@ -4,7 +4,7 @@ use crate::{themes::rose_pine_dawn,};use gpui3::{- black, div, img, svg, view, Context, Element, ParentElement, RootView, StyleHelpers, View,+ div, img, svg, view, white, Context, Element, ParentElement, RootView, StyleHelpers, View,ViewContext, WindowContext,};@@ -29,10 +29,10 @@ impl Workspace {let theme = rose_pine_dawn();div().font("Helvetica")- .text_color(black())+ .text_color(white()).text_base().size_full()- .fill(theme.middle.positive.default.background)+ .fill(theme.middle.base.default.background).child("Hello world")// TODO: Implement style.