From 29f0078084aa34f182f66e0ec97811fb75b6144f Mon Sep 17 00:00:00 2001 From: Petros Amoiridis Date: Sat, 11 Mar 2023 17:40:47 +0200 Subject: [PATCH] Show tooltip for Give Feedback icon --- crates/feedback/src/deploy_feedback_button.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/feedback/src/deploy_feedback_button.rs b/crates/feedback/src/deploy_feedback_button.rs index 222c542eed..52d1ab9d92 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::().theme.clone(); Stack::new() .with_child( - MouseEventHandler::::new(0, cx, |state, cx| { - let theme = &cx.global::().theme; + MouseEventHandler::::new(0, cx, |state, _| { let style = &theme .workspace .status_bar @@ -54,6 +54,13 @@ impl View for DeployFeedbackButton { cx.dispatch_action(GiveFeedback) } }) + .with_tooltip::( + 0, + "Give Feedback".into(), + Some(Box::new(GiveFeedback)), + theme.tooltip.clone(), + cx, + ) .boxed(), ) .boxed()