diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs index 31a9f5cc03ed840af905f3652cf1ecc70830ddfc..b1c9e9c215324bbd6dcdf363d2aeb272ec86f057 100644 --- a/crates/theme/src/theme.rs +++ b/crates/theme/src/theme.rs @@ -402,9 +402,9 @@ pub struct StatusBarLspStatus { #[derive(Deserialize, Default)] pub struct Dock { - pub initial_size: f32, - #[serde(flatten)] - pub container: ContainerStyle, + pub left: ContainerStyle, + pub bottom: ContainerStyle, + pub right: ContainerStyle, } #[derive(Clone, Deserialize, Default)] diff --git a/crates/workspace/src/dock.rs b/crates/workspace/src/dock.rs index 7e6868f9b095558532487da27904ae49d40a86fc..6ca78cd935b0c35aa3303ba683364fd07449c4d1 100644 --- a/crates/workspace/src/dock.rs +++ b/crates/workspace/src/dock.rs @@ -372,11 +372,10 @@ impl Dock { pub fn render_placeholder(&self, cx: &WindowContext) -> AnyElement { if let Some(active_entry) = self.active_entry() { - let style = &settings::get::(cx).theme.workspace.dock; Empty::new() .into_any() .contained() - .with_style(style.container) + .with_style(self.style(cx)) .resizable( self.position.to_resize_handle_side(), active_entry.panel.size(cx), @@ -387,6 +386,16 @@ impl Dock { Empty::new().into_any() } } + + fn style(&self, cx: &WindowContext) -> ContainerStyle { + let theme = &settings::get::(cx).theme; + let style = match self.position { + DockPosition::Left => theme.workspace.dock.left, + DockPosition::Bottom => theme.workspace.dock.bottom, + DockPosition::Right => theme.workspace.dock.right, + }; + style + } } impl Entity for Dock { @@ -400,10 +409,10 @@ impl View for Dock { fn render(&mut self, cx: &mut ViewContext) -> AnyElement { if let Some(active_entry) = self.active_entry() { - let style = &settings::get::(cx).theme.workspace.dock; + let style = self.style(cx); ChildView::new(active_entry.panel.as_any(), cx) .contained() - .with_style(style.container) + .with_style(style) .resizable( self.position.to_resize_handle_side(), active_entry.panel.size(cx), diff --git a/styles/src/styleTree/workspace.ts b/styles/src/styleTree/workspace.ts index 501debc876200e47edea06b44b5d70f342671135..737d225784aeabe86edbdcf9a044748855ffc01f 100644 --- a/styles/src/styleTree/workspace.ts +++ b/styles/src/styleTree/workspace.ts @@ -128,8 +128,15 @@ export default function workspace(colorScheme: ColorScheme) { border: border(colorScheme.highest, { overlay: true }), }, dock: { - initialSize: 240, - border: border(layer, { left: true, right: true }), + left: { + border: border(layer, { right: true }), + }, + bottom: { + border: border(layer, { top: true }), + }, + right: { + border: border(layer, { left: true }), + } }, paneDivider: { color: borderColor(layer),