From 62171387f631344c9e76b61e7cab4bc9a6ae5e6b Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Wed, 17 Apr 2024 13:20:47 +0200 Subject: [PATCH] Do not show tooltip for editor controls if clicked (#10679) This avoids the tooltip showing up when the context menu is visible. It fixes this: ![screenshot-2024-04-17-13 17 41@2x](https://github.com/zed-industries/zed/assets/1185253/373bb70e-9c7f-4b9f-a928-8206697c6039) Release Notes: - N/A --- crates/quick_action_bar/src/quick_action_bar.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/quick_action_bar/src/quick_action_bar.rs b/crates/quick_action_bar/src/quick_action_bar.rs index 6485ee1301..620c21c807 100644 --- a/crates/quick_action_bar/src/quick_action_bar.rs +++ b/crates/quick_action_bar/src/quick_action_bar.rs @@ -180,7 +180,9 @@ impl Render for QuickActionBar { quick_action_bar.toggle_settings_menu = Some(menu); }) }) - .tooltip(|cx| Tooltip::text("Editor Controls", cx)); + .when(self.toggle_settings_menu.is_none(), |this| { + this.tooltip(|cx| Tooltip::text("Editor Controls", cx)) + }); h_flex() .id("quick action bar")