From 3223e21d9fcf12d8b22ae63c3d561a74177a4d5b Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 16 Nov 2023 16:17:17 -0500 Subject: [PATCH] Add dock borders --- crates/workspace2/src/dock.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/workspace2/src/dock.rs b/crates/workspace2/src/dock.rs index 8e7f08252c80d8d69a3349dbe21daf2be18eb780..ee45ca862c96a4ca034645748ca4ac730c40223e 100644 --- a/crates/workspace2/src/dock.rs +++ b/crates/workspace2/src/dock.rs @@ -7,6 +7,7 @@ use gpui::{ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::sync::Arc; +use theme2::ActiveTheme; use ui::{h_stack, IconButton, InteractionState, Tooltip}; pub enum PanelEvent { @@ -443,10 +444,16 @@ impl Render for Dock { let size = entry.panel.size(cx); div() + .border_color(cx.theme().colors().border) .map(|this| match self.position().axis() { Axis::Horizontal => this.w(px(size)).h_full(), Axis::Vertical => this.h(px(size)).w_full(), }) + .map(|this| match self.position() { + DockPosition::Left => this.border_r(), + DockPosition::Right => this.border_l(), + DockPosition::Bottom => this.border_t(), + }) .child(entry.panel.to_any()) } else { div() @@ -675,7 +682,7 @@ impl Render for PanelButtons { Some(button) }); - h_stack().children(buttons) + h_stack().gap_0p5().children(buttons) } }