From d69b07bafd1f20c3415172143fabfee66965be70 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Fri, 7 Jul 2023 16:30:19 +0200 Subject: [PATCH 1/2] Add tooltip to recent projects button Z-2545 --- crates/collab_ui/src/collab_titlebar_item.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/collab_ui/src/collab_titlebar_item.rs b/crates/collab_ui/src/collab_titlebar_item.rs index 73450e7c7d..606a77cd2f 100644 --- a/crates/collab_ui/src/collab_titlebar_item.rs +++ b/crates/collab_ui/src/collab_titlebar_item.rs @@ -229,15 +229,23 @@ impl CollabTitlebarItem { let mut ret = Flex::row().with_child( Stack::new() .with_child( - MouseEventHandler::::new(0, cx, |mouse_state, _| { + MouseEventHandler::::new(0, cx, |mouse_state, cx| { let style = project_style .in_state(self.project_popover.is_some()) .style_for(mouse_state); + enum RecentProjectsTooltip {} Label::new(name, style.text.clone()) .contained() .with_style(style.container) .aligned() .left() + .with_tooltip::( + 0, + "Recent projects".into(), + None, + theme.tooltip.clone(), + cx, + ) .into_any_named("title-project-name") }) .with_cursor_style(CursorStyle::PointingHand) From 3318896ad964824e64a0831eab7fa48ce04d8aa1 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Mon, 10 Jul 2023 14:29:30 +0200 Subject: [PATCH 2/2] Display key bind of a modal project picker --- crates/collab_ui/src/collab_titlebar_item.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/collab_ui/src/collab_titlebar_item.rs b/crates/collab_ui/src/collab_titlebar_item.rs index 606a77cd2f..3d4d314902 100644 --- a/crates/collab_ui/src/collab_titlebar_item.rs +++ b/crates/collab_ui/src/collab_titlebar_item.rs @@ -242,7 +242,7 @@ impl CollabTitlebarItem { .with_tooltip::( 0, "Recent projects".into(), - None, + Some(Box::new(recent_projects::OpenRecent)), theme.tooltip.clone(), cx, )