diff --git a/crates/collab_ui/src/collab_titlebar_item.rs b/crates/collab_ui/src/collab_titlebar_item.rs index 9027a0937b..2a8870fe66 100644 --- a/crates/collab_ui/src/collab_titlebar_item.rs +++ b/crates/collab_ui/src/collab_titlebar_item.rs @@ -259,11 +259,17 @@ impl CollabTitlebarItem { ) -> Option { let active_call = ActiveCall::global(cx); let room = active_call.read(cx).room().cloned()?; - let icon = if room.read(cx).is_screen_sharing() { - "icons/disable_screen_sharing_12.svg" + let icon; + let tooltip; + + if room.read(cx).is_screen_sharing() { + icon = "icons/disable_screen_sharing_12.svg"; + tooltip = "Stop Sharing Screen" } else { - "icons/enable_screen_sharing_12.svg" - }; + icon = "icons/enable_screen_sharing_12.svg"; + tooltip = "Share Screen"; + } + let titlebar = &theme.workspace.titlebar; Some( MouseEventHandler::::new(0, cx, |state, _| { @@ -284,6 +290,13 @@ impl CollabTitlebarItem { .on_click(MouseButton::Left, move |_, cx| { cx.dispatch_action(ToggleScreenSharing); }) + .with_tooltip::( + 0, + tooltip.into(), + Some(Box::new(ToggleScreenSharing)), + theme.tooltip.clone(), + cx, + ) .aligned() .boxed(), )