From 97d77440e7c967d3bafcf851cea7f870ced871f3 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 16 Oct 2023 13:07:15 -0400 Subject: [PATCH] Simplify static panes for now --- crates/ui2/src/components/workspace.rs | 48 +++++--------------------- 1 file changed, 9 insertions(+), 39 deletions(-) diff --git a/crates/ui2/src/components/workspace.rs b/crates/ui2/src/components/workspace.rs index 0df024d4538f63da65bd8d873abdf5d9f5299ea4..cca2efe7d09a5fa5f9a89fbbe2c1b5ebe20462d1 100644 --- a/crates/ui2/src/components/workspace.rs +++ b/crates/ui2/src/components/workspace.rs @@ -12,7 +12,6 @@ use crate::{ pub struct Workspace { title_bar: View, editor_1: View, - editor_2: View, show_project_panel: bool, show_collab_panel: bool, show_chat_panel: bool, @@ -30,7 +29,6 @@ impl Workspace { Self { title_bar: TitleBar::view(cx), editor_1: EditorPane::view(cx), - editor_2: EditorPane::view(cx), show_project_panel: true, show_collab_panel: false, show_chat_panel: true, @@ -117,43 +115,15 @@ impl Workspace { pub fn render(&mut self, cx: &mut ViewContext) -> impl Element { let theme = theme(cx).clone(); - let temp_size = rems(36.).into(); - - let root_group = PaneGroup::new_groups( - vec![ - PaneGroup::new_panes( - vec![ - Pane::new( - ScrollState::default(), - Size { - width: relative(1.).into(), - height: temp_size, - }, - ) - .child(self.editor_1.clone()), - Pane::new( - ScrollState::default(), - Size { - width: relative(1.).into(), - height: temp_size, - }, - ) - .child(Terminal::new()), - ], - SplitDirection::Vertical, - ), - PaneGroup::new_panes( - vec![Pane::new( - ScrollState::default(), - Size { - width: relative(1.).into(), - height: relative(1.).into(), - }, - ) - .child(self.editor_2.clone())], - SplitDirection::Vertical, - ), - ], + let root_group = PaneGroup::new_panes( + vec![Pane::new( + ScrollState::default(), + Size { + width: relative(1.).into(), + height: relative(1.).into(), + }, + ) + .child(self.editor_1.clone())], SplitDirection::Horizontal, );