Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Ensure disabled buttons don't have interaction styles
Nate Butler118c9b5fe878
diff --git a/crates/theme2/src/one_themes.rs b/crates/theme2/src/one_themes.rsindex 2f663618a68..e1fb5f1bed2 100644--- a/crates/theme2/src/one_themes.rs+++ b/crates/theme2/src/one_themes.rs@@ -52,13 +52,13 @@ pub(crate) fn one_dark() -> Theme {element_hover: hsla(225.0 / 360., 11.8 / 100., 26.7 / 100., 1.0),element_active: hsla(220.0 / 360., 11.8 / 100., 20.0 / 100., 1.0),element_selected: hsla(224.0 / 360., 11.3 / 100., 26.1 / 100., 1.0),- element_disabled: hsla(224.0 / 360., 11.3 / 100., 26.1 / 100., 1.0),+ element_disabled: SystemColors::default().transparent,drop_target_background: hsla(220.0 / 360., 8.3 / 100., 21.4 / 100., 1.0),ghost_element_background: SystemColors::default().transparent,ghost_element_hover: hsla(225.0 / 360., 11.8 / 100., 26.7 / 100., 1.0),ghost_element_active: hsla(220.0 / 360., 11.8 / 100., 20.0 / 100., 1.0),ghost_element_selected: hsla(224.0 / 360., 11.3 / 100., 26.1 / 100., 1.0),- ghost_element_disabled: hsla(224.0 / 360., 11.3 / 100., 26.1 / 100., 1.0),+ ghost_element_disabled: SystemColors::default().transparent,text: hsla(221. / 360., 11. / 100., 86. / 100., 1.0),text_muted: hsla(218.0 / 360., 7. / 100., 46. / 100., 1.0),text_placeholder: hsla(220.0 / 360., 6.6 / 100., 44.5 / 100., 1.0),diff --git a/crates/ui2/src/components/button/button_like.rs b/crates/ui2/src/components/button/button_like.rsindex 4161cf6c7fd..020de0cc8a7 100644--- a/crates/ui2/src/components/button/button_like.rs+++ b/crates/ui2/src/components/button/button_like.rs@@ -327,8 +327,20 @@ impl RenderOnce for ButtonLike {.gap_1().px_1().bg(self.style.enabled(cx).background)- .hover(|hover| hover.bg(self.style.hovered(cx).background))- .active(|active| active.bg(self.style.active(cx).background))+ .hover(|hover| {+ hover.bg(if self.disabled {+ self.style.disabled(cx).background+ } else {+ self.style.hovered(cx).background+ })+ })+ .active(|active| {+ active.bg(if self.disabled {+ self.style.disabled(cx).background+ } else {+ self.style.active(cx).background+ })+ }).when_some(self.on_click.filter(|_| !self.disabled),|this, on_click| {