From 0d43d484f68a504e2649fd75183b3dd59c5f3933 Mon Sep 17 00:00:00 2001 From: versecafe <147033096+versecafe@users.noreply.github.com> Date: Fri, 14 Jun 2024 14:21:16 -0400 Subject: [PATCH] Use square buttons for code action and run indicators in the gutter (#12906) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Before Screenshot 2024-06-14 at 1 34 54 PM Screenshot 2024-06-14 at 1 35 04 PM ### After Screenshot 2024-06-14 at 1 34 27 PM Screenshot 2024-06-14 at 1 34 33 PM Release Notes: - Improved the look of code action and run indicators in the gutter ([#12803](https://github.com/zed-industries/zed/issues/12803)). --------- Co-authored-by: Marshall Bowers --- crates/editor/src/editor.rs | 4 ++-- crates/ui/src/components/button/icon_button.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index fbd8863c6b..62f7eaa878 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -4915,8 +4915,8 @@ impl Editor { if self.available_code_actions.is_some() { Some( IconButton::new("code_actions_indicator", ui::IconName::Bolt) + .shape(ui::IconButtonShape::Square) .icon_size(IconSize::XSmall) - .size(ui::ButtonSize::None) .icon_color(Color::Muted) .selected(is_active) .on_click(cx.listener(move |editor, _e, cx| { @@ -4953,8 +4953,8 @@ impl Editor { cx: &mut ViewContext, ) -> IconButton { IconButton::new(("run_indicator", row.0 as usize), ui::IconName::Play) + .shape(ui::IconButtonShape::Square) .icon_size(IconSize::XSmall) - .size(ui::ButtonSize::None) .icon_color(Color::Muted) .selected(is_active) .on_click(cx.listener(move |editor, _e, cx| { diff --git a/crates/ui/src/components/button/icon_button.rs b/crates/ui/src/components/button/icon_button.rs index 3973ebe8c6..9edc23ac2d 100644 --- a/crates/ui/src/components/button/icon_button.rs +++ b/crates/ui/src/components/button/icon_button.rs @@ -145,7 +145,7 @@ impl RenderOnce for IconButton { let icon_size = self.icon_size.rems() * cx.rem_size(); let padding = match self.icon_size { IconSize::Indicator => Spacing::None.px(cx), - IconSize::XSmall => Spacing::None.px(cx), + IconSize::XSmall => Spacing::XSmall.px(cx), IconSize::Small => Spacing::XSmall.px(cx), IconSize::Medium => Spacing::XSmall.px(cx), };