diff --git a/lightningbeam-ui/lightningbeam-editor/src/export/gpu_yuv.rs b/lightningbeam-ui/lightningbeam-editor/src/export/gpu_yuv.rs index c5cc8a0..9dcda91 100644 --- a/lightningbeam-ui/lightningbeam-editor/src/export/gpu_yuv.rs +++ b/lightningbeam-ui/lightningbeam-editor/src/export/gpu_yuv.rs @@ -175,7 +175,9 @@ impl GpuYuv { } /// CPU reference for the exact math/layout the shader produces — used by unit tests so -/// the packing and BT.709 coefficients stay verifiable without a GPU. +/// the packing and BT.709 coefficients stay verifiable without a GPU. Test-only, so it isn't +/// compiled into (and flagged as unused by) release builds. +#[cfg(test)] fn cpu_reference(rgba: &[u8], width: u32, height: u32, full_range: bool) -> Vec { let w = width as usize; let h = height as usize; diff --git a/lightningbeam-ui/lightningbeam-editor/src/mobile/mod.rs b/lightningbeam-ui/lightningbeam-editor/src/mobile/mod.rs index df1ec1f..31385ea 100644 --- a/lightningbeam-ui/lightningbeam-editor/src/mobile/mod.rs +++ b/lightningbeam-ui/lightningbeam-editor/src/mobile/mod.rs @@ -40,7 +40,7 @@ const TOPBAR_H: f32 = 40.0; /// Clamp a desktop dialog width to fit the current screen (with side margins). A no-op on wide /// desktop screens (`min` keeps the desired width); on a phone-aspect window it shrinks to fit. pub fn dialog_width(ctx: &egui::Context, desired: f32) -> f32 { - let avail = ctx.screen_rect().width() - 24.0; + let avail = ctx.content_rect().width() - 24.0; desired.min(avail.max(200.0)) } diff --git a/lightningbeam-ui/lightningbeam-editor/src/panes/node_graph/mobile.rs b/lightningbeam-ui/lightningbeam-editor/src/panes/node_graph/mobile.rs index 051a29d..824f49d 100644 --- a/lightningbeam-ui/lightningbeam-editor/src/panes/node_graph/mobile.rs +++ b/lightningbeam-ui/lightningbeam-editor/src/panes/node_graph/mobile.rs @@ -36,8 +36,6 @@ pub struct MobileNodeState { pub mode: NodeViewMode, /// The module currently shown in Focus (and centred in Patch). pub focus_node: Option, - /// Armed cable source in Patch: (node, output-port index). - pub patch_source: Option<(NodeId, usize)>, /// Whether the add-node picker overlay is open. pub show_add: bool, /// Search filter in the add-node picker. @@ -51,7 +49,6 @@ impl Default for MobileNodeState { Self { mode: NodeViewMode::Focus, focus_node: None, - patch_source: None, show_add: false, add_search: String::new(), patch_pick: None, diff --git a/lightningbeam-ui/lightningbeam-editor/src/preferences/dialog.rs b/lightningbeam-ui/lightningbeam-editor/src/preferences/dialog.rs index 16e379d..7ef5391 100644 --- a/lightningbeam-ui/lightningbeam-editor/src/preferences/dialog.rs +++ b/lightningbeam-ui/lightningbeam-editor/src/preferences/dialog.rs @@ -165,7 +165,7 @@ impl PreferencesDialog { // mobile modals; on desktop, the familiar draggable window. let width = crate::mobile::dialog_width(ctx, 550.0); let scroll_h = if mobile { - (ctx.screen_rect().height() - 220.0).clamp(160.0, 400.0) + (ctx.content_rect().height() - 220.0).clamp(160.0, 400.0) } else { 400.0 };