WIP
This commit is contained in:
parent
8f0f5a9ba1
commit
5a41eed120
5 changed files with 57 additions and 18 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -10831,6 +10831,7 @@ dependencies = [
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"terminal2",
|
"terminal2",
|
||||||
"theme2",
|
"theme2",
|
||||||
|
"ui2",
|
||||||
"util",
|
"util",
|
||||||
"uuid 1.4.1",
|
"uuid 1.4.1",
|
||||||
]
|
]
|
||||||
|
|
|
@ -35,6 +35,7 @@ settings2 = { path = "../settings2" }
|
||||||
terminal2 = { path = "../terminal2" }
|
terminal2 = { path = "../terminal2" }
|
||||||
theme2 = { path = "../theme2" }
|
theme2 = { path = "../theme2" }
|
||||||
util = { path = "../util" }
|
util = { path = "../util" }
|
||||||
|
ui = { package = "ui2", path = "../ui2" }
|
||||||
|
|
||||||
async-recursion = "1.0.0"
|
async-recursion = "1.0.0"
|
||||||
itertools = "0.10"
|
itertools = "0.10"
|
||||||
|
|
|
@ -606,6 +606,7 @@ impl Render for PanelButtons {
|
||||||
type Element = Div<Self>;
|
type Element = Div<Self>;
|
||||||
|
|
||||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||||
|
// todo!()
|
||||||
let dock = self.dock.read(cx);
|
let dock = self.dock.read(cx);
|
||||||
div().children(
|
div().children(
|
||||||
dock.panel_entries
|
dock.panel_entries
|
||||||
|
|
|
@ -12,6 +12,7 @@ use project2::Project;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use theme2::ThemeVariant;
|
use theme2::ThemeVariant;
|
||||||
|
use ui::prelude::*;
|
||||||
|
|
||||||
const HANDLE_HITBOX_SIZE: f32 = 4.0;
|
const HANDLE_HITBOX_SIZE: f32 = 4.0;
|
||||||
const HORIZONTAL_MIN_SIZE: f32 = 80.;
|
const HORIZONTAL_MIN_SIZE: f32 = 80.;
|
||||||
|
@ -124,7 +125,6 @@ impl PaneGroup {
|
||||||
pub(crate) fn render(
|
pub(crate) fn render(
|
||||||
&self,
|
&self,
|
||||||
project: &Model<Project>,
|
project: &Model<Project>,
|
||||||
theme: &ThemeVariant,
|
|
||||||
follower_states: &HashMap<View<Pane>, FollowerState>,
|
follower_states: &HashMap<View<Pane>, FollowerState>,
|
||||||
active_call: Option<&Model<ActiveCall>>,
|
active_call: Option<&Model<ActiveCall>>,
|
||||||
active_pane: &View<Pane>,
|
active_pane: &View<Pane>,
|
||||||
|
@ -135,7 +135,6 @@ impl PaneGroup {
|
||||||
self.root.render(
|
self.root.render(
|
||||||
project,
|
project,
|
||||||
0,
|
0,
|
||||||
theme,
|
|
||||||
follower_states,
|
follower_states,
|
||||||
active_call,
|
active_call,
|
||||||
active_pane,
|
active_pane,
|
||||||
|
@ -187,7 +186,6 @@ impl Member {
|
||||||
&self,
|
&self,
|
||||||
project: &Model<Project>,
|
project: &Model<Project>,
|
||||||
basis: usize,
|
basis: usize,
|
||||||
theme: &ThemeVariant,
|
|
||||||
follower_states: &HashMap<View<Pane>, FollowerState>,
|
follower_states: &HashMap<View<Pane>, FollowerState>,
|
||||||
active_call: Option<&Model<ActiveCall>>,
|
active_call: Option<&Model<ActiveCall>>,
|
||||||
active_pane: &View<Pane>,
|
active_pane: &View<Pane>,
|
||||||
|
@ -195,7 +193,40 @@ impl Member {
|
||||||
app_state: &Arc<AppState>,
|
app_state: &Arc<AppState>,
|
||||||
cx: &mut ViewContext<Workspace>,
|
cx: &mut ViewContext<Workspace>,
|
||||||
) -> AnyElement<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 {}
|
// enum FollowIntoExternalProject {}
|
||||||
|
|
||||||
|
|
|
@ -3803,20 +3803,25 @@ impl Render for Workspace {
|
||||||
// "maxbrunsfeld has requested to add you as a contact.".into(),
|
// "maxbrunsfeld has requested to add you as a contact.".into(),
|
||||||
// ))
|
// ))
|
||||||
.child(
|
.child(
|
||||||
div()
|
div().flex().flex_col().flex_1().h_full().child(
|
||||||
.flex()
|
div().flex().flex_1().child(self.center.render(
|
||||||
.flex_col()
|
project,
|
||||||
.flex_1()
|
follower_states,
|
||||||
.h_full()
|
active_call,
|
||||||
.child(div().flex().flex_1()), // .children(
|
active_pane,
|
||||||
// Some(
|
zoomed,
|
||||||
// Panel::new("terminal-panel", cx)
|
app_state,
|
||||||
// .child(Terminal::new())
|
cx,
|
||||||
// .allowed_sides(PanelAllowedSides::BottomOnly)
|
)),
|
||||||
// .side(PanelSide::Bottom),
|
), // .children(
|
||||||
// )
|
// Some(
|
||||||
// .filter(|_| self.is_terminal_open()),
|
// Panel::new("terminal-panel", cx)
|
||||||
// ),
|
// .child(Terminal::new())
|
||||||
|
// .allowed_sides(PanelAllowedSides::BottomOnly)
|
||||||
|
// .side(PanelSide::Bottom),
|
||||||
|
// )
|
||||||
|
// .filter(|_| self.is_terminal_open()),
|
||||||
|
// ),
|
||||||
), // .children(
|
), // .children(
|
||||||
// Some(
|
// Some(
|
||||||
// Panel::new("chat-panel-outer", cx)
|
// Panel::new("chat-panel-outer", cx)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue