Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Add tooltip to language selector

Joseph T. Lyonsf4a9d3f26979
diff --git a/crates/language_selector/src/active_buffer_language.rs b/crates/language_selector/src/active_buffer_language.rs
index 5ffcb13fbaf..01333c1ffb8 100644
--- a/crates/language_selector/src/active_buffer_language.rs
+++ b/crates/language_selector/src/active_buffer_language.rs
@@ -52,6 +52,7 @@ impl View for ActiveBufferLanguage {
} else {
"Unknown".to_string()
};
+ let theme = theme::current(cx).clone();
MouseEventHandler::new::<Self, _>(0, cx, |state, cx| {
let theme = &theme::current(cx).workspace.status_bar;
@@ -68,6 +69,7 @@ impl View for ActiveBufferLanguage {
});
}
})
+ .with_tooltip::<Self>(0, "Select Language", None, theme.tooltip.clone(), cx)
.into_any()
} else {
Empty::new().into_any()