Fix: UI/UX
Some checks failed
CI / check (ubuntu-latest, x86_64-unknown-linux-gnu) (push) Failing after 1m28s
Deploy Website / deploy (push) Has been skipped
CI / check (macos-14, aarch64-apple-darwin) (push) Has been cancelled
CI / check (windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled

This commit is contained in:
2026-03-01 00:58:26 +01:00
parent 19bb3e0820
commit e73ee1eb1e
17 changed files with 196 additions and 73 deletions

View File

@@ -49,6 +49,9 @@ pub(super) fn handle_engine_page(ctx: &mut InputContext, key: KeyEvent) -> Input
EngineSection::Settings => {
ctx.dispatch(AppCommand::AudioSettingPrev);
}
EngineSection::Samples => {
ctx.app.audio.sample_list.move_up();
}
_ => {}
},
KeyCode::Down => match ctx.app.audio.section {
@@ -65,6 +68,10 @@ pub(super) fn handle_engine_page(ctx: &mut InputContext, key: KeyEvent) -> Input
EngineSection::Settings => {
ctx.dispatch(AppCommand::AudioSettingNext);
}
EngineSection::Samples => {
let count = ctx.app.audio.config.sample_paths.len();
ctx.app.audio.sample_list.move_down(count);
}
_ => {}
},
KeyCode::PageUp => {
@@ -128,14 +135,16 @@ pub(super) fn handle_engine_page(ctx: &mut InputContext, key: KeyEvent) -> Input
KeyCode::Char('R') if !ctx.app.plugin_mode => {
ctx.dispatch(AppCommand::AudioTriggerRestart);
}
KeyCode::Char('A') => {
KeyCode::Char('A') if ctx.app.audio.section == EngineSection::Samples => {
use crate::state::file_browser::FileBrowserState;
let state = FileBrowserState::new_load(String::new());
ctx.dispatch(AppCommand::OpenModal(Modal::AddSamplePath(Box::new(state))));
}
KeyCode::Char('D') => {
if ctx.app.audio.section == EngineSection::Samples {
ctx.dispatch(AppCommand::RemoveLastSamplePath);
let cursor = ctx.app.audio.sample_list.cursor;
ctx.dispatch(AppCommand::RemoveSamplePath(cursor));
ctx.app.save_settings(ctx.link);
} else if !ctx.app.plugin_mode {
ctx.dispatch(AppCommand::AudioRefreshDevices);
let out_count = ctx.app.audio.output_devices.len();