diff --git a/src/gui/mod.rs b/src/gui/mod.rs index d2a71df..248bc52 100644 --- a/src/gui/mod.rs +++ b/src/gui/mod.rs @@ -66,8 +66,11 @@ use winit::window::{Window, WindowAttributes, WindowId}; use self::child::{ChildEvent, ChildProc}; use self::tray::{TrayAction, TrayHandle, TrayStatus}; -/// Initial / minimum window size, in logical points. -const INNER_SIZE: [f64; 2] = [520.0, 480.0]; +/// Initial / minimum window size, in logical points. Initial height fits the +/// host screen (ticket + Copy + QR + Stop) without needing to scroll on a 1080p +/// display; the host screen still wraps in a ScrollArea for the case where the +/// user shrinks the window below MIN_INNER_SIZE proportions. +const INNER_SIZE: [f64; 2] = [520.0, 640.0]; const MIN_INNER_SIZE: [f64; 2] = [460.0, 380.0]; /// Events delivered to the winit loop from off the UI thread (or from egui). @@ -959,11 +962,16 @@ impl PixelPassApp { }); ui.separator(); - if running { - self.host_running(ui); - } else { - self.host_form(ui); - } + // Scroll the body, not the header — Menu/Host stay pinned at the top. + // Needed once the QR panel landed: ticket + Copy + QR + Stop overflows a + // shrunken window. + egui::ScrollArea::vertical().show(ui, |ui| { + if running { + self.host_running(ui); + } else { + self.host_form(ui); + } + }); } fn host_form(&mut self, ui: &mut egui::Ui) {