forge
Explore
Log in

Don't you dare go Hollow

Spectrum line is a mirrored envelope (top follows every band, bottom mirrors it, like mirrored bars) instead of an alternating zigzag

Browse files at this commit

a77dbaa50063344751d5f4bb4ca5569271c21ab8Ahmet Kaan GümüşParent: c23db22
  • style
    • spectrum line is a mirrored envelope (top follows every band, bottom mirrors it, like mirrored bars) instead of an alternating zigzag
  • feat
    • watch stats show the decoder codec and hardware/software, like sending
Show full message
🎨 style: spectrum line is a mirrored envelope (top follows every band, bottom mirrors it, like mirrored bars) instead of an alternating zigzag; ✨ feat: watch stats show the decoder codec and hardware/software, like sending
crates/client/src/gui/parts.rsmodified+10 -4
@@ -402,15 +402,21 @@ pub fn voice_line(bands: Option<&VecDeque<f32>>, voice: Voice, t: Tokens) -> Any
402 if frayed {402 if frayed {
403 path = path.dash_array(&[px(4.), px(3.)]);403 path = path.dash_array(&[px(4.), px(3.)]);
404 }404 }
405- path.move_to(point(bounds.origin.x, middle));405+ let crest = |index: usize, side: f32| {
406- for (index, level) in peaks.iter().enumerate() {
407 let along = (index as f32 + 0.5) / count;406 let along = (index as f32 + 0.5) / count;
408 let edge = (along.min(1. - along) * EDGE).min(1.);407 let edge = (along.min(1. - along) * EDGE).min(1.);
409- let side = if index % 2 == 0 { -1. } else { 1. };
410 let x = bounds.origin.x + bounds.size.width * along;408 let x = bounds.origin.x + bounds.size.width * along;
411- path.line_to(point(x, middle + px(side * level * edge * half)));409+ point(x, middle + px(side * peaks[index] * edge * half))
410+ };
411+ path.move_to(point(bounds.origin.x, middle));
412+ for index in 0..peaks.len() {
413+ path.line_to(crest(index, -1.));
412 }414 }
413 path.line_to(point(bounds.origin.x + bounds.size.width, middle));415 path.line_to(point(bounds.origin.x + bounds.size.width, middle));
416+ for index in (0..peaks.len()).rev() {
417+ path.line_to(crest(index, 1.));
418+ }
419+ path.line_to(point(bounds.origin.x, middle));
414 if let Ok(path) = path.build() {420 if let Ok(path) = path.build() {
415 window.paint_path(path, color);421 window.paint_path(path, color);
416 }422 }
crates/client/src/gui/voice_stats.rsmodified+10 -2
@@ -403,11 +403,19 @@ fn watching(
403 .children(watching.iter().map(|(user_id, kind, stats)| {403 .children(watching.iter().map(|(user_id, kind, stats)| {
404 let name = name(*user_id);404 let name = name(*user_id);
405 let detail = format!(405 let detail = format!(
406- "{} · {}",406+ "{} · {}{}",
407 kind_word(*kind),407 kind_word(*kind),
408 stats408 stats
409 .layer409 .layer
410- .map_or("…".to_string(), |layer| resolution_text(layer, stats.fps))410+ .map_or("…".to_string(), |layer| resolution_text(layer, stats.fps)),
411+ stats
412+ .layer
413+ .zip(stats.engine)
414+ .map_or(String::new(), |(layer, engine)| format!(
415+ " · {} · {}",
416+ layer.codec.name(),
417+ engine_label(engine)
418+ ))
411 );419 );
412 let bad = Quality::of_loss(stats.loss * 100.) == Quality::Poor;420 let bad = Quality::of_loss(stats.loss * 100.) == Quality::Poor;
413 stack(space::XXS)421 stack(space::XXS)