Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove search dismiss button
Max Brunsfeld04354675ca2d
diff --git a/crates/search/src/buffer_search.rs b/crates/search/src/buffer_search.rsindex e708781eca2..01d4b7693f1 100644--- a/crates/search/src/buffer_search.rs+++ b/crates/search/src/buffer_search.rs@@ -214,7 +214,7 @@ impl View for BufferSearchBar {let icon_style = theme.search.editor_icon.clone();let nav_column = Flex::row()- .with_child(self.render_action_button("Select All", cx))+ .with_child(self.render_action_button("all", cx)).with_child(nav_button_for_direction("<", Direction::Prev, cx)).with_child(nav_button_for_direction(">", Direction::Next, cx)).with_child(Flex::row().with_children(match_count))@@ -268,13 +268,6 @@ impl View for BufferSearchBar {.contained().with_style(theme.search.modes_container),)- .with_child(super::search_bar::render_close_button(- "Dismiss Buffer Search",- &theme.search,- cx,- |_, this, cx| this.dismiss(&Default::default(), cx),- Some(Box::new(Dismiss)),- )).constrained().with_height(theme.search.search_bar_row_height).aligned()diff --git a/crates/search/src/project_search.rs b/crates/search/src/project_search.rsindex 6364183877b..8542124a256 100644--- a/crates/search/src/project_search.rs+++ b/crates/search/src/project_search.rs@@ -1597,17 +1597,6 @@ impl View for ProjectSearchBar {.contained().with_style(theme.search.modes_container),)- .with_child(super::search_bar::render_close_button(- "Dismiss Project Search",- &theme.search,- cx,- |_, this, cx| {- if let Some(search) = this.active_project_search.as_mut() {- search.update(cx, |_, cx| cx.emit(ViewEvent::Dismiss))- }- },- None,- )).constrained().with_height(theme.search.search_bar_row_height).aligned()diff --git a/crates/search/src/search_bar.rs b/crates/search/src/search_bar.rsindex 7d3c5261ea7..4676b8f0279 100644--- a/crates/search/src/search_bar.rs+++ b/crates/search/src/search_bar.rs@@ -13,34 +13,6 @@ use crate::{SelectNextMatch, SelectPrevMatch,};-pub(super) fn render_close_button<V: View>(- tooltip: &'static str,- theme: &theme::Search,- cx: &mut ViewContext<V>,- on_click: impl Fn(MouseClick, &mut V, &mut EventContext<V>) + 'static,- dismiss_action: Option<Box<dyn Action>>,-) -> AnyElement<V> {- let tooltip_style = theme::current(cx).tooltip.clone();-- enum CloseButton {}- MouseEventHandler::new::<CloseButton, _>(0, cx, |state, _| {- let style = theme.dismiss_button.style_for(state);- Svg::new("icons/x_mark_8.svg")- .with_color(style.color)- .constrained()- .with_width(style.icon_width)- .aligned()- .contained()- .with_style(style.container)- .constrained()- .with_height(theme.search_bar_row_height)- })- .on_click(MouseButton::Left, on_click)- .with_cursor_style(CursorStyle::PointingHand)- .with_tooltip::<CloseButton>(0, tooltip.to_string(), dismiss_action, tooltip_style, cx)- .into_any()-}-pub(super) fn render_nav_button<V: View>(icon: &'static str,direction: Direction,