From 7bc9319871d5519369b95a67a5bb4343bb091d2d Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 19 Dec 2023 16:01:03 -0500 Subject: [PATCH] Apply padding at the toolbar level (#3720) This PR adjusts the padding in the toolbar to be applied within the toolbar itself. Previously the different elements within the toolbar were applying their own padding, which led to inconsistencies. Release Notes: - N/A --- crates/search2/src/buffer_search.rs | 1 - crates/search2/src/project_search.rs | 2 -- crates/workspace2/src/toolbar.rs | 3 ++- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/search2/src/buffer_search.rs b/crates/search2/src/buffer_search.rs index 17dc13feaa1989f3a3d00be59483f2252ab2afb5..ebaf111e6061c9b9ca032774c9fd1c85f31b552f 100644 --- a/crates/search2/src/buffer_search.rs +++ b/crates/search2/src/buffer_search.rs @@ -240,7 +240,6 @@ impl Render for BufferSearchBar { this.on_action(cx.listener(Self::toggle_whole_word)) }) .w_full() - .p_1() .child( h_stack() .flex_1() diff --git a/crates/search2/src/project_search.rs b/crates/search2/src/project_search.rs index 4e41c8b5a9e9758312be9df136ce08ce951227a7..af8ac418347a9b5f9e06888dd3bac3e8c4b8a143 100644 --- a/crates/search2/src/project_search.rs +++ b/crates/search2/src/project_search.rs @@ -1716,8 +1716,6 @@ impl Render for ProjectSearchBar { v_stack() .key_context(key_context) .flex_grow() - .p_1() - .m_2() .gap_2() .on_action(cx.listener(|this, _: &ToggleFilters, cx| { this.toggle_filters(cx); diff --git a/crates/workspace2/src/toolbar.rs b/crates/workspace2/src/toolbar.rs index 1c60b8967f4b3553905b706b2038e077954be2b3..cd25582f36cbd397688a500e85c0e405865dae63 100644 --- a/crates/workspace2/src/toolbar.rs +++ b/crates/workspace2/src/toolbar.rs @@ -103,6 +103,8 @@ impl Render for Toolbar { let secondary_item = self.secondary_items().next().map(|item| item.to_any()); v_stack() + .p_1() + .gap_2() .border_b() .border_color(cx.theme().colors().border_variant) .bg(cx.theme().colors().toolbar_background) @@ -112,7 +114,6 @@ impl Render for Toolbar { .when(self.left_items().count() > 0, |this| { this.child( h_stack() - .p_1() .flex_1() .justify_start() .children(self.left_items().map(|item| item.to_any())),