Capitalize tooltip labels on buffer search (#18458)

For consistency, as this seems to be the pattern we're using overall for
labels and buttons.

---

Release Notes:

- N/A
This commit is contained in:
Danilo Leal
2024-09-27 17:02:32 -03:00
committed by GitHub
parent d5f67406b0
commit 1c5be9de4e
2 changed files with 10 additions and 10 deletions
+7 -7
View File
@@ -288,7 +288,7 @@ impl Render for BufferSearchBar {
let focus_handle = focus_handle.clone();
move |cx| {
Tooltip::for_action_in(
"Toggle search selection",
"Toggle Search Selection",
&ToggleSelection,
&focus_handle,
cx,
@@ -308,7 +308,7 @@ impl Render for BufferSearchBar {
let focus_handle = focus_handle.clone();
move |cx| {
Tooltip::for_action_in(
"Select all matches",
"Select All Matches",
&SelectAllMatches,
&focus_handle,
cx,
@@ -319,14 +319,14 @@ impl Render for BufferSearchBar {
.child(render_nav_button(
ui::IconName::ChevronLeft,
self.active_match_index.is_some(),
"Select previous match",
"Select Previous Match",
&SelectPrevMatch,
focus_handle.clone(),
))
.child(render_nav_button(
ui::IconName::ChevronRight,
self.active_match_index.is_some(),
"Select next match",
"Select Next Match",
&SelectNextMatch,
focus_handle.clone(),
))
@@ -373,7 +373,7 @@ impl Render for BufferSearchBar {
let focus_handle = focus_handle.clone();
move |cx| {
Tooltip::for_action_in(
"Replace next match",
"Replace Next Match",
&ReplaceNext,
&focus_handle,
cx,
@@ -390,7 +390,7 @@ impl Render for BufferSearchBar {
let focus_handle = focus_handle.clone();
move |cx| {
Tooltip::for_action_in(
"Replace all matches",
"Replace All Matches",
&ReplaceAll,
&focus_handle,
cx,
@@ -442,7 +442,7 @@ impl Render for BufferSearchBar {
div.child(
IconButton::new(SharedString::from("Close"), IconName::Close)
.tooltip(move |cx| {
Tooltip::for_action("Close search bar", &Dismiss, cx)
Tooltip::for_action("Close Search Bar", &Dismiss, cx)
})
.on_click(cx.listener(|this, _: &ClickEvent, cx| {
this.dismiss(&Dismiss, cx)
+3 -3
View File
@@ -53,10 +53,10 @@ bitflags! {
impl SearchOptions {
pub fn label(&self) -> &'static str {
match *self {
SearchOptions::WHOLE_WORD => "Match whole words",
SearchOptions::CASE_SENSITIVE => "Match case sensitively",
SearchOptions::WHOLE_WORD => "Match Whole Words",
SearchOptions::CASE_SENSITIVE => "Match Case Sensitively",
SearchOptions::INCLUDE_IGNORED => "Also search files ignored by configuration",
SearchOptions::REGEX => "Use regular expressions",
SearchOptions::REGEX => "Use Regular Expressions",
_ => panic!("{:?} is not a named SearchOption", self),
}
}