From dcb69c5c09761280576a2ef80bdcf8fcf326d053 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 16:26:43 +0000 Subject: [PATCH] ui: the phone's voice screen gets one header, room for chat and Hold to talk The shell's top bar is the only header on the voice screen: Back, the channel on its banner, the server below it. ChannelBar and ChatHeader are gone, Pinned Messages and Topics are entries of the More menu, and Leave is only in the bottom bar. The people strip and the scroll cap leave the chat about 320 px at 390 x 844 (it had about 190). With push-to-talk, Hold to talk is the bottom bar's middle control and the composer's microphone button is gone; Go Live and Share are one Share control that opens the share menu, as on desktop; the microphone button reads Mic on or Mic off. The audio form was only filled when the settings opened, so every start showed push-to-talk controls whatever the stored mode; the transmit mode is now set at start and when the setting changes. VOELIN_OPEN=more opens the More menu for screenshots. The menu is not in a layout, so Slint centred it in the bar and it opened 30 px low; it now sits at the bar's corner. Co-Authored-By: Claude Sonnet 5.5 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ --- CHANGELOG.md | 11 + crates/voelin-ui/src/app.rs | 3 + crates/voelin-ui/src/dev.rs | 54 ++- crates/voelin-ui/src/settings.rs | 45 ++- crates/voelin-ui/src/settings_page.rs | 11 + crates/voelin-ui/ui/app.slint | 12 +- crates/voelin-ui/ui/nav.slint | 3 + .../voelin-ui/ui/screens/mobile-voice.slint | 371 ++++++++---------- crates/voelin-ui/ui/screens/mobile.slint | 3 +- crates/voelin-ui/ui/share-menu.slint | 5 +- crates/voelin-ui/ui/shells/mobile.slint | 48 ++- docs/android.md | 8 +- docs/ui.md | 30 +- 13 files changed, 337 insertions(+), 267 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91488bd..7709c01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -148,6 +148,15 @@ User-visible changes of the apps and the `tsgw` gateway. The format follows pointer last moved over the picture (in full screen the cursor too; on a touch screen a tap shows or hides them), and the streamer, the title and LIVE are in the header above the picture instead of over it. +- The phone's voice screen has one header: the top bar shows the channel on + its banner, the server below it instead of the channel's topic, and Back; + Leave is only in the bottom bar. Pinned messages and topics are in the + More menu and the row of people is smaller, so the chat has about 130 px + more room. With push-to-talk, Hold to talk is the bottom bar's middle + button instead of the microphone button by the composer; Go Live and + Share are one Share button that opens the share menu (a screen, or the + Stream Studio) as on desktop. The microphone button says Mic on or Mic + off. - Banners: up to 128 MiB, more time on slow hosts, BMP and ICO too, and SVG after a comment or DOCTYPE; pictures larger than 4096 pixels on a side are scaled down. A banner that fails is tried again for as long as @@ -207,6 +216,8 @@ User-visible changes of the apps and the `tsgw` gateway. The format follows joined with a new identity (the gateway did not know it yet). - tsgw reconnects its query connection for logins when the TeamSpeak server restarts; before, every login was refused until tsgw was restarted. +- Push-to-talk controls (Hold to talk) showed in voice activation and + continuous mode until the settings had been opened once. ## [0.0.1-alpha] - 2026-10-04 diff --git a/crates/voelin-ui/src/app.rs b/crates/voelin-ui/src/app.rs index 2d32d5b..5eaa4b8 100644 --- a/crates/voelin-ui/src/app.rs +++ b/crates/voelin-ui/src/app.rs @@ -903,6 +903,7 @@ pub fn run(options: RunOptions) -> Result<()> { app.apply_srtp(); app.refresh_all(); app.refresh_settings_flags(); + app.refresh_transmit(); app.refresh_crash_notice(); app.load_recent_chats(); app.refresh_people(); @@ -1071,6 +1072,8 @@ impl App { fn setting_changed(&mut self, key: &str) { if key == AUDIO.name() && !self.audio_dirty { self.audio = self.prefs.get(&AUDIO); + // The voice controls follow the transmit mode. + self.refresh_transmit(); } else if key == CRASH_REPORTS.name() { let enabled = self.prefs.get(&CRASH_REPORTS); if enabled != self.settings.crash_reports { diff --git a/crates/voelin-ui/src/dev.rs b/crates/voelin-ui/src/dev.rs index c0f0216..9f61f7b 100644 --- a/crates/voelin-ui/src/dev.rs +++ b/crates/voelin-ui/src/dev.rs @@ -20,6 +20,8 @@ //! client once connected), `panel` / `no-panel` (the members panel), //! `voice` (the voice channel view; on the phone its own screen; //! `voice:compact` with the smaller stage, not stored), +//! `more` (after `voice` on the phone: the voice screen's More menu, +//! opened once the screen is laid out), //! `members` (the phone's members page), `notification` (a tapped voice //! notification), `shared:` (text shared to the app on Android), //! `pins`, `topics` (the drawers), @@ -167,6 +169,7 @@ pub(crate) struct Running { _screenshot: Option, _resize: Option, _scroll: Option, + _more: Option, } /// Apply the switches once the app is set up. @@ -279,6 +282,8 @@ pub(crate) fn start(ui: &MainWindow, switches: &Switches) -> Running { } } "pins" => nav.invoke_show_pins(true), + // Opened once laid out (below). + "more" => {} // The phone's members page. "members" => nav.set_members_open(true), // What Android hands over: a tapped voice notification, text @@ -410,20 +415,18 @@ pub(crate) fn start(ui: &MainWindow, switches: &Switches) -> Running { // `unread`: up to the divider once the list is laid out (after the // resize above). let scroll = switches.open.iter().any(|o| o == "unread").then(|| { - let weak = ui.as_weak(); - let timer = slint::Timer::default(); - timer.start( - slint::TimerMode::SingleShot, - Duration::from_millis(switches.screenshot_delay * 1000 * 3 / 4), - move || { - if let Some(ui) = weak.upgrade() { - let bridge = ui.global::(); - bridge.set_jump_index(bridge.get_unread_index()); - bridge.set_jump_requests(bridge.get_jump_requests().wrapping_add(1)); - } - }, - ); - timer + late(ui, switches, |ui| { + let bridge = ui.global::(); + bridge.set_jump_index(bridge.get_unread_index()); + bridge.set_jump_requests(bridge.get_jump_requests().wrapping_add(1)); + }) + }); + // `more`: the phone voice screen's More menu (a screenshot cannot tap). + let more = switches.open.iter().any(|o| o == "more").then(|| { + late(ui, switches, |ui| { + let nav = ui.global::