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.

Show tooltip for Give Feedback icon

Petros Amoiridis29f0078084aa
diff --git a/crates/feedback/src/deploy_feedback_button.rs b/crates/feedback/src/deploy_feedback_button.rs
index 222c542eed4..52d1ab9d92d 100644
--- a/crates/feedback/src/deploy_feedback_button.rs
+++ b/crates/feedback/src/deploy_feedback_button.rs
@@ -25,10 +25,10 @@ impl View for DeployFeedbackButton {
fn render(&mut self, cx: &mut RenderContext<'_, Self>) -> ElementBox {
let active = self.active;
+ let theme = cx.global::<Settings>().theme.clone();
Stack::new()
.with_child(
- MouseEventHandler::<Self>::new(0, cx, |state, cx| {
- let theme = &cx.global::<Settings>().theme;
+ MouseEventHandler::<Self>::new(0, cx, |state, _| {
let style = &theme
.workspace
.status_bar
@@ -54,6 +54,13 @@ impl View for DeployFeedbackButton {
cx.dispatch_action(GiveFeedback)
}
})
+ .with_tooltip::<Self, _>(
+ 0,
+ "Give Feedback".into(),
+ Some(Box::new(GiveFeedback)),
+ theme.tooltip.clone(),
+ cx,
+ )
.boxed(),
)
.boxed()