From 8cfa69027104bf3516413587cad6689c26d1f798 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 9 Jul 2024 12:11:18 -0600 Subject: [PATCH] Fix transparency (#14010) Release Notes: - (preview only) Fix transparent themes --- crates/title_bar/src/title_bar.rs | 6 +++++- crates/workspace/src/status_bar.rs | 6 +++++- crates/workspace/src/workspace.rs | 1 - 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/crates/title_bar/src/title_bar.rs b/crates/title_bar/src/title_bar.rs index 328b56241ff60b952efbd47e5d8e727519afe64e..02e6390c2db6cc03e1b73d7e79c6fef2a45c79c1 100644 --- a/crates/title_bar/src/title_bar.rs +++ b/crates/title_bar/src/title_bar.rs @@ -96,7 +96,11 @@ impl Render for TitleBar { }) .when(!(tiling.top || tiling.left), |el| { el.rounded_tl(theme::CLIENT_SIDE_DECORATION_ROUNDING) - }), + }) + // this border is to avoid a transparent gap in the rounded corners + .mt(px(-1.)) + .border(px(1.)) + .border_color(cx.theme().colors().title_bar_background), }) .bg(cx.theme().colors().title_bar_background) .content_stretch() diff --git a/crates/workspace/src/status_bar.rs b/crates/workspace/src/status_bar.rs index f2d2b73854e06764680b47f5799c0642b21bb377..ea92451bf0243c17cb1c4e0c41d82705ff10ce20 100644 --- a/crates/workspace/src/status_bar.rs +++ b/crates/workspace/src/status_bar.rs @@ -50,7 +50,11 @@ impl Render for StatusBar { }) .when(!(tiling.bottom || tiling.left), |el| { el.rounded_bl(CLIENT_SIDE_DECORATION_ROUNDING) - }), + }) + // This border is to avoid a transparent gap in the rounded corners + .mb(px(-1.)) + .border_b(px(1.0)) + .border_color(cx.theme().colors().status_bar_background), }) .child(self.render_left_tools(cx)) .child(self.render_right_tools(cx)) diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index 7d424dcce2a5909a0bfe09ceb761b27ecd1b1f63..fb7c3e45bc5af5f58c0e0da84e5b5e0be6708a68 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -6596,7 +6596,6 @@ pub fn client_side_decorations(element: impl IntoElement, cx: &mut WindowContext .on_mouse_move(|_e, cx| { cx.stop_propagation(); }) - .bg(cx.theme().colors().border) .size_full() .child(element), )