From a5203364b1240c88aa464a13e87b15341d8f4d73 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Wed, 10 Jan 2024 10:35:06 -0500 Subject: [PATCH] Use the `.selected` style for buffer search option buttons (#4000) This PR updates the `IconButton`s used to control the buffer search options to use the `.selected` state to denote when they are active. This matches what we are doing in the project search. This should improve the contrast in certain themes. Release Notes: - Improved the active style for the search options in buffer search. --- crates/search/src/search.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/search/src/search.rs b/crates/search/src/search.rs index 1b29801e03..748996c389 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();