From 702fd8f168be6607f25b70d3fa2a6b879d65e0b4 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 13 Jun 2024 15:39:06 -0400 Subject: [PATCH] ui: Render disclosures with `IconButtonShape::Square` (#13004) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR adjusts the `Disclosure` component to render using `IconButtonShape::Square`. This tightens up the hover styles so they aren't quite so massive. ### Before Screenshot 2024-06-13 at 3 22 43 PM ### After Screenshot 2024-06-13 at 3 23 02 PM Release Notes: - Tweaked the style of disclosure controls throughout the UI. --- crates/ui/src/components/disclosure.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui/src/components/disclosure.rs b/crates/ui/src/components/disclosure.rs index fa6122273dcabccf0984242835698d0bb3583445..3223a2d57c5a2c74b84563a1af13e821074c849f 100644 --- a/crates/ui/src/components/disclosure.rs +++ b/crates/ui/src/components/disclosure.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use gpui::ClickEvent; -use crate::{prelude::*, Color, IconButton, IconName, IconSize}; +use crate::{prelude::*, Color, IconButton, IconButtonShape, IconName, IconSize}; #[derive(IntoElement)] pub struct Disclosure { @@ -38,6 +38,7 @@ impl RenderOnce for Disclosure { false => IconName::ChevronRight, }, ) + .shape(IconButtonShape::Square) .icon_color(Color::Muted) .icon_size(IconSize::Small) .when_some(self.on_toggle, move |this, on_toggle| {