From 65c63defccac454cc92bf972f728563b13383015 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:40:55 -0300 Subject: [PATCH] Ensure quick action bar icon buttons are a square (#15092) As the title says! Also decreased a bit the gap between them so that's consistent with other similar icon button stacks. I wish they could be bigger buttons but the icons would need to be refined further for that, as each has been drawn with a different dimension/bounding-box. Maybe in the near future :) --- Release Notes: - N/A --- crates/quick_action_bar/src/quick_action_bar.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/quick_action_bar/src/quick_action_bar.rs b/crates/quick_action_bar/src/quick_action_bar.rs index b3fe9bd342..89ef4ac9d1 100644 --- a/crates/quick_action_bar/src/quick_action_bar.rs +++ b/crates/quick_action_bar/src/quick_action_bar.rs @@ -14,7 +14,7 @@ use gpui::{ use search::{buffer_search, BufferSearchBar}; use settings::{Settings, SettingsStore}; use ui::{ - prelude::*, ButtonSize, ButtonStyle, ContextMenu, IconButton, IconName, IconSize, Tooltip, + prelude::*, ButtonStyle, ContextMenu, IconButton, IconButtonShape, IconName, IconSize, Tooltip, }; use workspace::{ item::ItemHandle, ToolbarItemEvent, ToolbarItemLocation, ToolbarItemView, Workspace, @@ -158,7 +158,7 @@ impl Render for QuickActionBar { let editor_selections_dropdown = selection_menu_enabled.then(|| { IconButton::new("toggle_editor_selections_icon", IconName::TextCursor) - .size(ButtonSize::Compact) + .shape(IconButtonShape::Square) .icon_size(IconSize::Small) .style(ButtonStyle::Subtle) .selected(self.toggle_selections_menu.is_some()) @@ -207,7 +207,7 @@ impl Render for QuickActionBar { let editor_settings_dropdown = IconButton::new("toggle_editor_settings_icon", IconName::Sliders) - .size(ButtonSize::Compact) + .shape(IconButtonShape::Square) .icon_size(IconSize::Small) .style(ButtonStyle::Subtle) .selected(self.toggle_settings_menu.is_some()) @@ -300,7 +300,7 @@ impl Render for QuickActionBar { h_flex() .id("quick action bar") - .gap(Spacing::XLarge.rems(cx)) + .gap(Spacing::Large.rems(cx)) .child( h_flex() .gap(Spacing::Medium.rems(cx)) @@ -378,7 +378,7 @@ impl RenderOnce for QuickActionBarButton { let action = self.action.boxed_clone(); IconButton::new(self.id.clone(), self.icon) - .size(ButtonSize::Compact) + .shape(IconButtonShape::Square) .icon_size(IconSize::Small) .style(ButtonStyle::Subtle) .selected(self.toggled)