diff --git a/crates/client/src/gui/parts.rs b/crates/client/src/gui/parts.rs index 2a9de67..ee5346e 100644 --- a/crates/client/src/gui/parts.rs +++ b/crates/client/src/gui/parts.rs @@ -402,15 +402,21 @@ pub fn voice_line(bands: Option<&VecDeque>, voice: Voice, t: Tokens) -> Any if frayed { path = path.dash_array(&[px(4.), px(3.)]); } - path.move_to(point(bounds.origin.x, middle)); - for (index, level) in peaks.iter().enumerate() { + let crest = |index: usize, side: f32| { let along = (index as f32 + 0.5) / count; let edge = (along.min(1. - along) * EDGE).min(1.); - let side = if index % 2 == 0 { -1. } else { 1. }; let x = bounds.origin.x + bounds.size.width * along; - path.line_to(point(x, middle + px(side * level * edge * half))); + point(x, middle + px(side * peaks[index] * edge * half)) + }; + path.move_to(point(bounds.origin.x, middle)); + for index in 0..peaks.len() { + path.line_to(crest(index, -1.)); } path.line_to(point(bounds.origin.x + bounds.size.width, middle)); + for index in (0..peaks.len()).rev() { + path.line_to(crest(index, 1.)); + } + path.line_to(point(bounds.origin.x, middle)); if let Ok(path) = path.build() { window.paint_path(path, color); } diff --git a/crates/client/src/gui/voice_stats.rs b/crates/client/src/gui/voice_stats.rs index cb858e6..81709bd 100644 --- a/crates/client/src/gui/voice_stats.rs +++ b/crates/client/src/gui/voice_stats.rs @@ -403,11 +403,19 @@ fn watching( .children(watching.iter().map(|(user_id, kind, stats)| { let name = name(*user_id); let detail = format!( - "{} · {}", + "{} · {}{}", kind_word(*kind), stats .layer - .map_or("…".to_string(), |layer| resolution_text(layer, stats.fps)) + .map_or("…".to_string(), |layer| resolution_text(layer, stats.fps)), + stats + .layer + .zip(stats.engine) + .map_or(String::new(), |(layer, engine)| format!( + " · {} · {}", + layer.codec.name(), + engine_label(engine) + )) ); let bad = Quality::of_loss(stats.loss * 100.) == Quality::Poor; stack(space::XXS)