From a77dbaa50063344751d5f4bb4ca5569271c21ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sat, 28 Nov 2026 01:48:21 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20style:=20spectrum=20line=20is=20?= =?UTF-8?q?a=20mirrored=20envelope=20(top=20follows=20every=20band,=20bott?= =?UTF-8?q?om=20mirrors=20it,=20like=20mirrored=20bars)=20instead=20of=20a?= =?UTF-8?q?n=20alternating=20zigzag;=20=E2=9C=A8=20feat:=20watch=20stats?= =?UTF-8?q?=20show=20the=20decoder=20codec=20and=20hardware/software,=20li?= =?UTF-8?q?ke=20sending?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/gui/parts.rs | 14 ++++++++++---- crates/client/src/gui/voice_stats.rs | 12 ++++++++++-- 2 files changed, 20 insertions(+), 6 deletions(-) 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)