Add tab tooltips
This commit is contained in:
parent
e655a6c767
commit
ebe57254e0
10 changed files with 119 additions and 39 deletions
|
@ -13,7 +13,10 @@ use gpui::{
|
|||
};
|
||||
use settings::Settings;
|
||||
use smallvec::SmallVec;
|
||||
use std::sync::{Arc, Weak};
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
sync::{Arc, Weak},
|
||||
};
|
||||
|
||||
pub enum Event {
|
||||
Close,
|
||||
|
@ -92,6 +95,9 @@ impl View for SharedScreen {
|
|||
}
|
||||
|
||||
impl Item for SharedScreen {
|
||||
fn tab_tooltip_text<'a>(&'a self, _: &'a AppContext) -> Option<Cow<'a, str>> {
|
||||
Some(format!("{}'s screen", self.user.github_login).into())
|
||||
}
|
||||
fn deactivated(&mut self, cx: &mut ViewContext<Self>) {
|
||||
if let Some(nav_history) = self.nav_history.as_ref() {
|
||||
nav_history.push::<()>(None, cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue