Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Wire up hover styles on `Button`s
Marshall Bowers8321b9430e64
diff --git a/crates/ui2/src/elements/button.rs b/crates/ui2/src/elements/button.rsindex e57057360c3..65f0db175a9 100644--- a/crates/ui2/src/elements/button.rs+++ b/crates/ui2/src/elements/button.rs@@ -162,7 +162,15 @@ impl<S: 'static + Send + Sync + Clone> Button<S> {.rounded_md().border().border_color(border_color)- .bg(self.background_color(cx));+ .bg(self.background_color(cx))+ .hover(|style| {+ let color = ThemeColor::new(cx);++ style.bg(match self.variant {+ ButtonVariant::Ghost => color.ghost_element_hover,+ ButtonVariant::Filled => color.filled_element_hover,+ })+ });match (self.icon, self.icon_position) {(Some(_), Some(IconPosition::Left)) => {