chore: use Cow instead of String for tooltips (#2838)

A QoL change to align `Tooltip` with other elements like `Label`
Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2023-08-11 15:29:55 +02:00 committed by GitHub
parent 268f4b1939
commit ffffbbea1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 33 additions and 43 deletions

View file

@ -238,7 +238,7 @@ impl CollabTitlebarItem {
.left()
.with_tooltip::<RecentProjectsTooltip>(
0,
"Recent projects".into(),
"Recent projects",
Some(Box::new(recent_projects::OpenRecent)),
theme.tooltip.clone(),
cx,
@ -282,7 +282,7 @@ impl CollabTitlebarItem {
.left()
.with_tooltip::<BranchPopoverTooltip>(
0,
"Recent branches".into(),
"Recent branches",
Some(Box::new(ToggleVcsMenu)),
theme.tooltip.clone(),
cx,
@ -582,7 +582,7 @@ impl CollabTitlebarItem {
})
.with_tooltip::<ToggleContactsMenu>(
0,
"Show contacts menu".into(),
"Show contacts menu",
Some(Box::new(ToggleContactsMenu)),
theme.tooltip.clone(),
cx,
@ -633,7 +633,7 @@ impl CollabTitlebarItem {
})
.with_tooltip::<ToggleScreenSharing>(
0,
tooltip.into(),
tooltip,
Some(Box::new(ToggleScreenSharing)),
theme.tooltip.clone(),
cx,
@ -686,7 +686,7 @@ impl CollabTitlebarItem {
})
.with_tooltip::<ToggleMute>(
0,
tooltip.into(),
tooltip,
Some(Box::new(ToggleMute)),
theme.tooltip.clone(),
cx,
@ -734,7 +734,7 @@ impl CollabTitlebarItem {
})
.with_tooltip::<ToggleDeafen>(
0,
tooltip.into(),
tooltip,
Some(Box::new(ToggleDeafen)),
theme.tooltip.clone(),
cx,
@ -768,7 +768,7 @@ impl CollabTitlebarItem {
})
.with_tooltip::<LeaveCall>(
0,
tooltip.into(),
tooltip,
Some(Box::new(LeaveCall)),
theme.tooltip.clone(),
cx,

View file

@ -1345,7 +1345,7 @@ impl View for ContactList {
})
.with_tooltip::<AddContact>(
0,
"Search for new contact".into(),
"Search for new contact",
None,
theme.tooltip.clone(),
cx,