mirror of
https://github.com/storytold/soundcraft.git
synced 2026-10-26 11:36:51 -06:00
A plugin window listed every parameter in one grid. VST3 and CLAP plugins expose all of theirs, so a plugin with more parameters than fit on the screen ran off the bottom edge, and the ones below it couldn't be reached (#6). The parameters now scroll inside the window, below the header and the EQ curve, and the window stays on the screen.
20 lines
745 B
Rust
20 lines
745 B
Rust
use egui_kittest::Harness;
|
|
use soundcraft_ui_egui::{Services, SoundApp};
|
|
|
|
#[test]
|
|
fn a_long_plugin_window_stays_on_a_short_screen() {
|
|
let mut app = SoundApp::new(soundcraft_engine::demo::demo_engine(), None, Services::default());
|
|
let kick = app.engine.session().track_by_name("Kick").unwrap().id;
|
|
app.ui.plugin_windows = vec![(kick, 0)];
|
|
let mut h = Harness::builder().with_size(egui::vec2(1200.0, 500.0)).build_ui_state(
|
|
|ui, app: &mut SoundApp| {
|
|
app.logic(&ui.ctx().clone());
|
|
app.ui(ui);
|
|
},
|
|
app,
|
|
);
|
|
h.run_steps(4);
|
|
let window = h.ctx.memory(|m| m.area_rect(egui::Id::new(("plugin", kick.0, 0usize)))).unwrap();
|
|
assert!(window.bottom() <= 500.0, "{window:?}");
|
|
}
|