Skip to content

Commit

Permalink
ui: Round hover styles for ListItems with outlined set (zed-indus…
Browse files Browse the repository at this point in the history
…tries#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
  • Loading branch information
maxdeviant authored and helgemahrt committed Dec 18, 2024
1 parent 84ce835 commit 8228223
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/ui/src/components/list/list_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down

0 comments on commit 8228223

Please sign in to comment.