Add icon_tooltip for panel buttons rather than using persistent name (#3849)
Fixes missing spaces in these tooltips Release Notes: - N/A
This commit is contained in:
@@ -611,6 +611,10 @@ impl Panel for ChatPanel {
|
||||
Some(ui::Icon::MessageBubbles)
|
||||
}
|
||||
|
||||
fn icon_tooltip(&self, _cx: &WindowContext) -> Option<&'static str> {
|
||||
Some("Chat Panel")
|
||||
}
|
||||
|
||||
fn toggle_action(&self) -> Box<dyn gpui::Action> {
|
||||
Box::new(ToggleFocus)
|
||||
}
|
||||
|
||||
@@ -2362,6 +2362,10 @@ impl Panel for CollabPanel {
|
||||
.then(|| ui::Icon::Collab)
|
||||
}
|
||||
|
||||
fn icon_tooltip(&self, _cx: &WindowContext) -> Option<&'static str> {
|
||||
Some("Collab Panel")
|
||||
}
|
||||
|
||||
fn toggle_action(&self) -> Box<dyn gpui::Action> {
|
||||
Box::new(ToggleFocus)
|
||||
}
|
||||
|
||||
@@ -661,6 +661,10 @@ impl Panel for NotificationPanel {
|
||||
.then(|| Icon::Bell)
|
||||
}
|
||||
|
||||
fn icon_tooltip(&self, _cx: &WindowContext) -> Option<&'static str> {
|
||||
Some("Notification Panel")
|
||||
}
|
||||
|
||||
fn icon_label(&self, cx: &WindowContext) -> Option<String> {
|
||||
let count = self.notification_store.read(cx).unread_notification_count();
|
||||
if count == 0 {
|
||||
|
||||
Reference in New Issue
Block a user