From c394a3a890ff7717657f305ab984ef9d71923efa Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Fri, 21 Mar 2025 12:49:54 -0300 Subject: [PATCH] Adjust multibuffer header fold button size (#27253) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR adjust the size of the fold button on the multibuffer header. Had to make the `height` method public on the Button Like to pull that off without other major changes. | Before | After | |--------|--------| | ![CleanShot 2025-03-21 at 12  11 40@2x](https://github.com/user-attachments/assets/003b2965-b1cc-43ad-8528-2bd11cf0f9cc) | ![CleanShot 2025-03-21 at 12  11 28@2x](https://github.com/user-attachments/assets/d4927b72-3f41-4c4b-9813-49e676170419) | Release Notes: - N/A --- crates/editor/src/element.rs | 6 +++--- crates/ui/src/components/button/button_like.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 86cdbeb7be..77ca322b7c 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -2283,7 +2283,7 @@ impl EditorElement { }); }) .tooltip(Tooltip::for_action_title( - "Expand excerpt", + "Expand Excerpt", &crate::actions::ExpandExcerpts::default(), )) .into_any_element(); @@ -2903,8 +2903,8 @@ impl EditorElement { .child( ButtonLike::new("toggle-buffer-fold") .style(ui::ButtonStyle::Transparent) - .size(ButtonSize::Large) - .width(px(24.).into()) + .height(px(28.).into()) + .width(px(28.).into()) .children(toggle_chevron_icon) .tooltip({ let focus_handle = focus_handle.clone(); diff --git a/crates/ui/src/components/button/button_like.rs b/crates/ui/src/components/button/button_like.rs index e9ea85b01d..dc5aca8ca3 100644 --- a/crates/ui/src/components/button/button_like.rs +++ b/crates/ui/src/components/button/button_like.rs @@ -398,7 +398,7 @@ impl ButtonLike { self } - pub(crate) fn height(mut self, height: DefiniteLength) -> Self { + pub fn height(mut self, height: DefiniteLength) -> Self { self.height = Some(height); self }