Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Use the `.selected` style for buffer search option buttons (#4000)

Marshall Bowersa5203364b124
diff --git a/crates/search/src/search.rs b/crates/search/src/search.rs
index 1b29801e03a..748996c3893 100644
--- a/crates/search/src/search.rs
+++ b/crates/search/src/search.rs
@@ -98,7 +98,7 @@ impl SearchOptions {
IconButton::new(self.label(), self.icon())
.on_click(action)
.style(ButtonStyle::Subtle)
- .when(active, |button| button.style(ButtonStyle::Filled))
+ .selected(active)
.tooltip({
let action = self.to_toggle_action();
let label: SharedString = format!("Toggle {}", self.label()).into();