Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
WIP
Conrad Irwin5a41eed120ff
diff --git a/Cargo.lock b/Cargo.lockindex f91f574b9c6..134972e3a5f 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -10831,6 +10831,7 @@ dependencies = ["smallvec","terminal2","theme2",+ "ui2","util","uuid 1.4.1",]diff --git a/crates/workspace2/Cargo.toml b/crates/workspace2/Cargo.tomlindex 7c55d8bedb5..5072f2b8f94 100644--- a/crates/workspace2/Cargo.toml+++ b/crates/workspace2/Cargo.toml@@ -35,6 +35,7 @@ settings2 = { path = "../settings2" }terminal2 = { path = "../terminal2" }theme2 = { path = "../theme2" }util = { path = "../util" }+ui = { package = "ui2", path = "../ui2" }async-recursion = "1.0.0"itertools = "0.10"diff --git a/crates/workspace2/src/dock.rs b/crates/workspace2/src/dock.rsindex 727d777c460..20a06d16589 100644--- a/crates/workspace2/src/dock.rs+++ b/crates/workspace2/src/dock.rs@@ -606,6 +606,7 @@ impl Render for PanelButtons {type Element = Div<Self>;fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {+ // todo!()let dock = self.dock.read(cx);div().children(dock.panel_entriesdiff --git a/crates/workspace2/src/pane_group.rs b/crates/workspace2/src/pane_group.rsindex f4fdb6ba162..22bbb946a7f 100644--- a/crates/workspace2/src/pane_group.rs+++ b/crates/workspace2/src/pane_group.rs@@ -12,6 +12,7 @@ use project2::Project;use serde::Deserialize;use std::sync::Arc;use theme2::ThemeVariant;+use ui::prelude::*;const HANDLE_HITBOX_SIZE: f32 = 4.0;const HORIZONTAL_MIN_SIZE: f32 = 80.;@@ -124,7 +125,6 @@ impl PaneGroup {pub(crate) fn render(&self,project: &Model<Project>,- theme: &ThemeVariant,follower_states: &HashMap<View<Pane>, FollowerState>,active_call: Option<&Model<ActiveCall>>,active_pane: &View<Pane>,@@ -135,7 +135,6 @@ impl PaneGroup {self.root.render(project,0,- theme,follower_states,active_call,active_pane,@@ -187,7 +186,6 @@ impl Member {&self,project: &Model<Project>,basis: usize,- theme: &ThemeVariant,follower_states: &HashMap<View<Pane>, FollowerState>,active_call: Option<&Model<ActiveCall>>,active_pane: &View<Pane>,@@ -195,7 +193,40 @@ impl Member {app_state: &Arc<AppState>,cx: &mut ViewContext<Workspace>,) -> AnyElement<Workspace> {- todo!()+ match self {+ Member::Pane(pane) => {+ let pane_element = if Some(&**pane) == zoomed {+ None+ } else {+ Some(pane)+ };++ // Stack::new()+ // .with_child(pane_element.contained().with_border(leader_border))+ // .with_children(leader_status_box)+ // .into_any()++ let el = div()+ .flex()+ .flex_1()+ .gap_px()+ .w_full()+ .h_full()+ .bg(cx.theme().colors().editor)+ .children();+ }+ Member::Axis(axis) => axis.render(+ project,+ basis + 1,+ theme,+ follower_states,+ active_call,+ active_pane,+ zoomed,+ app_state,+ cx,+ ),+ }// enum FollowIntoExternalProject {}diff --git a/crates/workspace2/src/workspace2.rs b/crates/workspace2/src/workspace2.rsindex 61b9243894e..f3516c0fa41 100644--- a/crates/workspace2/src/workspace2.rs+++ b/crates/workspace2/src/workspace2.rs@@ -3803,20 +3803,25 @@ impl Render for Workspace {// "maxbrunsfeld has requested to add you as a contact.".into(),// )).child(- div()- .flex()- .flex_col()- .flex_1()- .h_full()- .child(div().flex().flex_1()), // .children(- // Some(- // Panel::new("terminal-panel", cx)- // .child(Terminal::new())- // .allowed_sides(PanelAllowedSides::BottomOnly)- // .side(PanelSide::Bottom),- // )- // .filter(|_| self.is_terminal_open()),- // ),+ div().flex().flex_col().flex_1().h_full().child(+ div().flex().flex_1().child(self.center.render(+ project,+ follower_states,+ active_call,+ active_pane,+ zoomed,+ app_state,+ cx,+ )),+ ), // .children(+ // Some(+ // Panel::new("terminal-panel", cx)+ // .child(Terminal::new())+ // .allowed_sides(PanelAllowedSides::BottomOnly)+ // .side(PanelSide::Bottom),+ // )+ // .filter(|_| self.is_terminal_open()),+ // ),), // .children(// Some(// Panel::new("chat-panel-outer", cx)