Increase border width used to indicate speaking (#4077)
This PR increases the width of the border that we use to indicate when a call participant is speaking. This should make it more apparent in the UI when someone is speaking. Release Notes: - Increased the width of the ring used to indicate when someone is speaking in a call.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use gpui::Render;
|
||||
use story::Story;
|
||||
use story::{StoryContainer, StoryItem, StorySection};
|
||||
|
||||
use crate::{prelude::*, AudioStatus, Availability, AvatarAvailabilityIndicator};
|
||||
use crate::{Avatar, AvatarAudioStatusIndicator};
|
||||
@@ -7,31 +7,57 @@ use crate::{Avatar, AvatarAudioStatusIndicator};
|
||||
pub struct AvatarStory;
|
||||
|
||||
impl Render for AvatarStory {
|
||||
fn render(&mut self, _cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||
Story::container()
|
||||
.child(Story::title_for::<Avatar>())
|
||||
.child(Story::label("Default"))
|
||||
.child(Avatar::new(
|
||||
"https://avatars.githubusercontent.com/u/1714999?v=4",
|
||||
))
|
||||
.child(Avatar::new(
|
||||
"https://avatars.githubusercontent.com/u/326587?v=4",
|
||||
))
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||
StoryContainer::new("Avatar", "crates/ui/src/components/stories/avatar.rs")
|
||||
.child(
|
||||
Avatar::new("https://avatars.githubusercontent.com/u/326587?v=4")
|
||||
.indicator(AvatarAvailabilityIndicator::new(Availability::Free)),
|
||||
StorySection::new()
|
||||
.child(StoryItem::new(
|
||||
"Default",
|
||||
Avatar::new("https://avatars.githubusercontent.com/u/1714999?v=4"),
|
||||
))
|
||||
.child(StoryItem::new(
|
||||
"Default",
|
||||
Avatar::new("https://avatars.githubusercontent.com/u/326587?v=4"),
|
||||
)),
|
||||
)
|
||||
.child(
|
||||
Avatar::new("https://avatars.githubusercontent.com/u/326587?v=4")
|
||||
.indicator(AvatarAvailabilityIndicator::new(Availability::Busy)),
|
||||
StorySection::new()
|
||||
.child(StoryItem::new(
|
||||
"With free availability indicator",
|
||||
Avatar::new("https://avatars.githubusercontent.com/u/326587?v=4")
|
||||
.indicator(AvatarAvailabilityIndicator::new(Availability::Free)),
|
||||
))
|
||||
.child(StoryItem::new(
|
||||
"With busy availability indicator",
|
||||
Avatar::new("https://avatars.githubusercontent.com/u/326587?v=4")
|
||||
.indicator(AvatarAvailabilityIndicator::new(Availability::Busy)),
|
||||
)),
|
||||
)
|
||||
.child(
|
||||
Avatar::new("https://avatars.githubusercontent.com/u/326587?v=4")
|
||||
.indicator(AvatarAudioStatusIndicator::new(AudioStatus::Muted)),
|
||||
StorySection::new()
|
||||
.child(StoryItem::new(
|
||||
"With info border",
|
||||
Avatar::new("https://avatars.githubusercontent.com/u/326587?v=4")
|
||||
.border_color(cx.theme().status().info_border),
|
||||
))
|
||||
.child(StoryItem::new(
|
||||
"With error border",
|
||||
Avatar::new("https://avatars.githubusercontent.com/u/326587?v=4")
|
||||
.border_color(cx.theme().status().error_border),
|
||||
)),
|
||||
)
|
||||
.child(
|
||||
Avatar::new("https://avatars.githubusercontent.com/u/326587?v=4")
|
||||
.indicator(AvatarAudioStatusIndicator::new(AudioStatus::Deafened)),
|
||||
StorySection::new()
|
||||
.child(StoryItem::new(
|
||||
"With muted audio indicator",
|
||||
Avatar::new("https://avatars.githubusercontent.com/u/326587?v=4")
|
||||
.indicator(AvatarAudioStatusIndicator::new(AudioStatus::Muted)),
|
||||
))
|
||||
.child(StoryItem::new(
|
||||
"With deafened audio indicator",
|
||||
Avatar::new("https://avatars.githubusercontent.com/u/326587?v=4")
|
||||
.indicator(AvatarAudioStatusIndicator::new(AudioStatus::Deafened)),
|
||||
)),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user