diff --git a/src/app/mod.rs b/src/app/mod.rs index 9722277..edd3fb2 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -1608,20 +1608,26 @@ fn view(state: &AppState) -> Element<'_, AppMessage> { let is_connecting = state.connecting.contains(peer_id); let is_speaking = !is_connecting && level > 0.01; - let indicator = if is_connecting { + let (ind_label, ind_color): (&str, Color) = if is_connecting { let label = if state.ever_connected.contains(peer_id) { "[Reconnecting…]" } else { "[Connecting…]" }; - text(label).size(14).color(color_yellow) + (label, color_yellow) } else if peer.is_muted { - text("[Muted]").size(14).color(color_red) + ("[Muted]", color_red) } else if is_speaking { - text("[Speaking]").size(14).color(color_green) + ("[Speaking]", color_green) } else { - text("[Idle]").size(14).color(color_subtext) + ("[Idle]", color_subtext) }; + // Fixed-width, right-aligned slot so the label changing (e.g. Idle→ + // Speaking) doesn't reflow the row and shift the mute button (A10). + // Width covers the longest label, "[Reconnecting…]". + let indicator = container(text(ind_label).size(14).color(ind_color)) + .width(iced::Length::Fixed(124.0)) + .align_x(iced::alignment::Horizontal::Right); let peer_id_clone = *peer_id; let is_locally_muted = state.locally_muted.contains(peer_id);