mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 11:01:40 +03:00
fix dismiss tooltip for project search
This commit is contained in:
parent
22f630e985
commit
d34da2db69
@ -288,6 +288,7 @@ impl View for BufferSearchBar {
|
||||
.with_child(search_button_for_mode(SearchMode::Text, cx))
|
||||
.with_child(search_button_for_mode(SearchMode::Regex, cx))
|
||||
.with_child(super::search_bar::render_close_button(
|
||||
"Dismiss Buffer Search",
|
||||
&theme.search,
|
||||
cx,
|
||||
|_, this, cx| this.dismiss(&Default::default(), cx),
|
||||
|
@ -1626,6 +1626,7 @@ impl View for ProjectSearchBar {
|
||||
.with_children(semantic_index)
|
||||
.with_child(search_button_for_mode(SearchMode::Regex, cx))
|
||||
.with_child(super::search_bar::render_close_button(
|
||||
"Dismiss Project Search",
|
||||
&theme.search,
|
||||
cx,
|
||||
|_, this, cx| {
|
||||
|
@ -13,12 +13,12 @@ use crate::{
|
||||
};
|
||||
|
||||
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 = "Dismiss Buffer Search";
|
||||
let tooltip_style = theme::current(cx).tooltip.clone();
|
||||
|
||||
enum CloseButton {}
|
||||
|
Loading…
Reference in New Issue
Block a user