From 3d2124ed98f9d343d59da908a9b3a851b61be26a Mon Sep 17 00:00:00 2001 From: Mollusk Date: Sun, 14 Jun 2026 15:35:49 -0400 Subject: [PATCH] fix(ui): keep the Leave button reachable on a short window (A12) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The controls column (mute/deafen/PTT/echo/record/share/Leave) had no scroll, so on a short window the bottom of it — including Leave — was clipped with no way to reach it; the only workaround was enlarging the window. At a small enough size you couldn't exit the call through the UI at all. Fix: pin Leave at the bottom of the control panel and wrap the controls above it in a scrollable (height Fill). The controls now scroll when the window is too short, and Leave (the exit control) is always visible. Applies to all three room layouts (control_panel is Fill-height in every arm). Build + clippy clean. Manual check: create a room, shrink the window — Leave stays put, controls scroll. Co-Authored-By: Claude Opus 4.8 --- src/app/mod.rs | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/app/mod.rs b/src/app/mod.rs index edd3fb2..e47e54f 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -1834,22 +1834,30 @@ fn view(state: &AppState) -> Element<'_, AppMessage> { share_btn = share_btn.on_press(AppMessage::ToggleScreenShare); } share_btn - }, - vertical_space(30.0), - button(btn_content(IconKind::Leave, "Leave Room", color_crust)) + } + ]; + + // Leave is the exit control, so it's pinned below the scrolling controls + // (built separately, outside `ctrl_buttons`) — see the panel assembly (A12). + let leave_btn = button(btn_content(IconKind::Leave, "Leave Room", color_crust)) .on_press(AppMessage::LeavePressed) .style(b_style(color_red, color_maroon, color_crust, 8.0)) .padding(14) - .width(iced::Length::Fill) - ]; + .width(iced::Length::Fill); - // Controls panel — width is set per layout below. + // Controls panel — width is set per layout below. The controls SCROLL when + // the window is too short, and Leave stays pinned at the bottom so the exit + // control is always reachable instead of being clipped off-screen (A12). let control_panel = container( column![ text("Controls").size(18).color(color_blue), vertical_space(15.0), - ctrl_buttons, - vertical_space(20.0), + scrollable(ctrl_buttons) + .width(iced::Length::Fill) + .height(iced::Length::Fill), + vertical_space(12.0), + leave_btn, + vertical_space(8.0), text(&state.status_message).size(12).color(color_subtext) ] )