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.
This commit is contained in:
Marshall Bowers 2024-01-10 10:35:06 -05:00 committed by GitHub
parent aff119b80a
commit a5203364b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,7 +98,7 @@ impl SearchOptions {
IconButton::new(self.label(), self.icon()) IconButton::new(self.label(), self.icon())
.on_click(action) .on_click(action)
.style(ButtonStyle::Subtle) .style(ButtonStyle::Subtle)
.when(active, |button| button.style(ButtonStyle::Filled)) .selected(active)
.tooltip({ .tooltip({
let action = self.to_toggle_action(); let action = self.to_toggle_action();
let label: SharedString = format!("Toggle {}", self.label()).into(); let label: SharedString = format!("Toggle {}", self.label()).into();