From 8228223ea56b3e061fdc20c2aa7e54f4b5046110 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Mon, 16 Dec 2024 18:43:16 -0500 Subject: [PATCH] ui: Round hover styles for `ListItem`s with `outlined` set (#22120) This PR makes `ListItem`s with `outlined` set use the same rounding for their hover state to ensure that the hover background doesn't bleed outside of the outline. Release Notes: - N/A --- crates/ui/src/components/list/list_item.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/ui/src/components/list/list_item.rs b/crates/ui/src/components/list/list_item.rs index 908c873f9d740d..a33916380f0c3f 100644 --- a/crates/ui/src/components/list/list_item.rs +++ b/crates/ui/src/components/list/list_item.rs @@ -202,6 +202,7 @@ impl RenderOnce for ListItem { .when(self.selectable, |this| { this.hover(|style| style.bg(cx.theme().colors().ghost_element_hover)) .active(|style| style.bg(cx.theme().colors().ghost_element_active)) + .when(self.outlined, |this| this.rounded_md()) .when(self.selected, |this| { this.bg(cx.theme().colors().ghost_element_selected) })