Unified · Split
| @@ -288,6 +288,7 @@ impl View for BufferSearchBar { · 287 unmodified lines | |||
| 288 | .with_child(search_button_for_mode(SearchMode::Text, cx)) | 288 | .with_child(search_button_for_mode(SearchMode::Text, cx)) |
| 289 | .with_child(search_button_for_mode(SearchMode::Regex, cx)) | 289 | .with_child(search_button_for_mode(SearchMode::Regex, cx)) |
| 290 | .with_child(super::search_bar::render_close_button( | 290 | .with_child(super::search_bar::render_close_button( |
| 291 | "Dismiss Buffer Search", | ||
| 291 | &theme.search, | 292 | &theme.search, |
| 292 | cx, | 293 | cx, |
| 293 | |_, this, cx| this.dismiss(&Default::default(), cx), | 294 | |_, this, cx| this.dismiss(&Default::default(), cx), |
| @@ -1626,6 +1626,7 @@ impl View for ProjectSearchBar { · 1625 unmodified lines | |||
| 1626 | .with_children(semantic_index) | 1626 | .with_children(semantic_index) |
| 1627 | .with_child(search_button_for_mode(SearchMode::Regex, cx)) | 1627 | .with_child(search_button_for_mode(SearchMode::Regex, cx)) |
| 1628 | .with_child(super::search_bar::render_close_button( | 1628 | .with_child(super::search_bar::render_close_button( |
| 1629 | "Dismiss Project Search", | ||
| 1629 | &theme.search, | 1630 | &theme.search, |
| 1630 | cx, | 1631 | cx, |
| 1631 | |_, this, cx| { | 1632 | |_, this, cx| { |
| @@ -13,12 +13,12 @@ use crate::{ · 12 unmodified lines | |||
| 13 | }; | 13 | }; |
| 14 | 14 | ||
| 15 | pub(super) fn render_close_button<V: View>( | 15 | pub(super) fn render_close_button<V: View>( |
| 16 | tooltip: &'static str, | ||
| 16 | theme: &theme::Search, | 17 | theme: &theme::Search, |
| 17 | cx: &mut ViewContext<V>, | 18 | cx: &mut ViewContext<V>, |
| 18 | on_click: impl Fn(MouseClick, &mut V, &mut EventContext<V>) + 'static, | 19 | on_click: impl Fn(MouseClick, &mut V, &mut EventContext<V>) + 'static, |
| 19 | dismiss_action: Option<Box<dyn Action>>, | 20 | dismiss_action: Option<Box<dyn Action>>, |
| 20 | ) -> AnyElement<V> { | 21 | ) -> AnyElement<V> { |
| 21 | let tooltip = "Dismiss Buffer Search"; | ||
| 22 | let tooltip_style = theme::current(cx).tooltip.clone(); | 22 | let tooltip_style = theme::current(cx).tooltip.clone(); |
| 23 | 23 | ||
| 24 | enum CloseButton {} | 24 | enum CloseButton {} |