From c17777b83148c9123a3105aac3e8e77da9aec7d2 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Tue, 21 Apr 2026 14:41:47 -0300 Subject: [PATCH] fix(launcher): tie device testing height to staging --- client/Cargo.toml | 2 +- client/src/launcher/ui_components.rs | 28 +++++++++++++--------------- common/Cargo.toml | 2 +- server/Cargo.toml | 2 +- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/client/Cargo.toml b/client/Cargo.toml index e5362b7..5eae874 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -4,7 +4,7 @@ path = "src/main.rs" [package] name = "lesavka_client" -version = "0.11.38" +version = "0.11.39" edition = "2024" [dependencies] diff --git a/client/src/launcher/ui_components.rs b/client/src/launcher/ui_components.rs index c8b66c3..443f4e8 100644 --- a/client/src/launcher/ui_components.rs +++ b/client/src/launcher/ui_components.rs @@ -82,6 +82,7 @@ pub struct LauncherWidgets { pub diagnostics_popout_button: gtk::Button, pub console_copy_button: gtk::Button, pub console_popout_button: gtk::Button, + pub _device_body_height_group: gtk::SizeGroup, } #[derive(Clone)] @@ -113,8 +114,6 @@ const LAUNCHER_DEFAULT_HEIGHT: i32 = 860; const OPERATIONS_RAIL_WIDTH: i32 = 288; const CAMERA_PREVIEW_VIEWPORT_HEIGHT: i32 = 72; const CAMERA_PREVIEW_VIEWPORT_WIDTH: i32 = 128; -const DEVICE_PANEL_HEIGHT: i32 = 204; -const DEVICE_TEST_GROUP_HEIGHT: i32 = 156; const SIDE_LOG_HEIGHT: i32 = 104; pub fn build_launcher_view( @@ -204,7 +203,6 @@ pub fn build_launcher_view( staging_row.set_vexpand(false); staging_row.set_valign(gtk::Align::Start); staging_row.set_homogeneous(true); - staging_row.set_size_request(-1, DEVICE_PANEL_HEIGHT); workspace.append(&staging_row); let device_refresh_button = gtk::Button::with_label("Refresh Devices"); @@ -217,7 +215,6 @@ pub fn build_launcher_view( devices_panel.set_hexpand(true); devices_panel.set_vexpand(false); devices_panel.set_valign(gtk::Align::Fill); - devices_panel.set_size_request(-1, DEVICE_PANEL_HEIGHT); devices_body.set_spacing(8); let control_group = build_subgroup("Control Inputs"); @@ -328,14 +325,15 @@ pub fn build_launcher_view( preview_panel.set_hexpand(true); preview_panel.set_vexpand(false); preview_panel.set_valign(gtk::Align::Fill); - preview_panel.set_size_request(-1, DEVICE_PANEL_HEIGHT); preview_body.set_vexpand(false); preview_body.set_spacing(8); let testing_row = gtk::Box::new(gtk::Orientation::Horizontal, 8); testing_row.set_hexpand(true); - testing_row.set_vexpand(false); - testing_row.set_valign(gtk::Align::Start); - testing_row.set_size_request(-1, DEVICE_TEST_GROUP_HEIGHT); + testing_row.set_vexpand(true); + testing_row.set_valign(gtk::Align::Fill); + let device_body_height_group = gtk::SizeGroup::new(gtk::SizeGroupMode::Vertical); + device_body_height_group.add_widget(&devices_body); + device_body_height_group.add_widget(&testing_row); let camera_preview = gtk::Picture::new(); camera_preview.set_can_shrink(false); camera_preview.set_hexpand(false); @@ -371,17 +369,16 @@ pub fn build_launcher_view( camera_preview_shell.append(&camera_preview_frame); let webcam_group = build_subgroup("Webcam Preview"); webcam_group.set_hexpand(true); - webcam_group.set_vexpand(false); - webcam_group.set_valign(gtk::Align::Start); - webcam_group.set_size_request(-1, DEVICE_TEST_GROUP_HEIGHT); + webcam_group.set_vexpand(true); + webcam_group.set_valign(gtk::Align::Fill); webcam_group.append(&camera_preview_shell); testing_row.append(&webcam_group); let playback_group = build_subgroup("Mic Playback"); playback_group.set_hexpand(false); - playback_group.set_vexpand(false); - playback_group.set_valign(gtk::Align::Start); - playback_group.set_size_request(72, DEVICE_TEST_GROUP_HEIGHT); + playback_group.set_vexpand(true); + playback_group.set_valign(gtk::Align::Fill); + playback_group.set_size_request(72, -1); let playback_body = gtk::Box::new(gtk::Orientation::Vertical, 6); playback_body.set_halign(gtk::Align::Center); playback_body.set_vexpand(true); @@ -721,6 +718,7 @@ pub fn build_launcher_view( diagnostics_popout_button: diagnostics_popout_button.clone(), console_copy_button: console_copy_button.clone(), console_popout_button: console_popout_button.clone(), + _device_body_height_group: device_body_height_group, }; let popouts = Rc::new(RefCell::new([None, None])); let diagnostics_popout = Rc::new(RefCell::new(None)); @@ -853,7 +851,7 @@ pub fn install_css(window: >k::ApplicationWindow) { background: rgba(255, 255, 255, 0.08); } progressbar.audio-check-meter.vertical trough { - min-height: 72px; + min-height: 116px; } progressbar.audio-check-meter progress { border-radius: 999px; diff --git a/common/Cargo.toml b/common/Cargo.toml index d98719a..9b09219 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lesavka_common" -version = "0.11.38" +version = "0.11.39" edition = "2024" build = "build.rs" diff --git a/server/Cargo.toml b/server/Cargo.toml index d9e743f..326d6ad 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -10,7 +10,7 @@ bench = false [package] name = "lesavka_server" -version = "0.11.38" +version = "0.11.39" edition = "2024" autobins = false