Add dedicated indicator for showing a muted call participant (#4076)
This PR improves the muted indicators to make it clearer when a call participant is muted. Previously we used a red border color to denote when a participant was muted. Now we render an indicator with an icon to more clearly indicate the participant's muted status: <img width="303" alt="Screenshot 2024-01-16 at 4 05 15 PM" src="https://github.com/zed-industries/zed/assets/1486634/d30fcd84-48e7-4959-b3c4-1054162c6bd6"> Hovering over the indicator will display a tooltip for further explanation: <img width="456" alt="Screenshot 2024-01-16 at 4 05 25 PM" src="https://github.com/zed-industries/zed/assets/1486634/6345846f-196c-47d9-8d65-c8d86e63f823"> This change also paves the way for denoting the deafened status for call participants. Release Notes: - Improved the mute indicator for call participants.
This commit is contained in:
parent
9903b7ae6e
commit
2e03c848e3
6 changed files with 92 additions and 10 deletions
|
@ -14,8 +14,8 @@ use rpc::proto;
|
|||
use std::sync::Arc;
|
||||
use theme::ActiveTheme;
|
||||
use ui::{
|
||||
h_flex, popover_menu, prelude::*, Avatar, Button, ButtonLike, ButtonStyle, ContextMenu, Icon,
|
||||
IconButton, IconName, TintColor, Tooltip,
|
||||
h_flex, popover_menu, prelude::*, Avatar, AvatarAudioStatusIndicator, Button, ButtonLike,
|
||||
ButtonStyle, ContextMenu, Icon, IconButton, IconName, TintColor, Tooltip,
|
||||
};
|
||||
use util::ResultExt;
|
||||
use vcs_menu::{build_branch_list, BranchList, OpenRecent as ToggleVcsMenu};
|
||||
|
@ -486,12 +486,16 @@ impl CollabTitlebarItem {
|
|||
.child(
|
||||
Avatar::new(user.avatar_uri.clone())
|
||||
.grayscale(!is_present)
|
||||
.border_color(if is_speaking {
|
||||
cx.theme().status().info_border
|
||||
} else if is_muted {
|
||||
cx.theme().status().error_border
|
||||
} else {
|
||||
Hsla::default()
|
||||
.when(is_speaking, |avatar| {
|
||||
avatar.border_color(cx.theme().status().info_border)
|
||||
})
|
||||
.when(is_muted, |avatar| {
|
||||
avatar.indicator(
|
||||
AvatarAudioStatusIndicator::new(ui::AudioStatus::Muted).tooltip({
|
||||
let github_login = user.github_login.clone();
|
||||
move |cx| Tooltip::text(format!("{} is muted", github_login), cx)
|
||||
}),
|
||||
)
|
||||
}),
|
||||
)
|
||||
.children(followers.iter().filter_map(|follower_peer_id| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue