wip: unify default config
Some checks are pending
/ build (push) Waiting to run

This commit is contained in:
🪞👃🪞 2025-08-10 16:13:54 +03:00
parent 4d4c470a81
commit 50728729b7
8 changed files with 232 additions and 335 deletions

View file

@ -16,12 +16,12 @@ pub const VIEW: DslNs<'static, DslCb> = DslNs(&[
(":view/ports/ins", |state|Box::new(Fill::x(Fixed::y(3,
Bsp::a(Fill::x(Align::w(" L AUDIO INS")), Bsp::a("MIDI INS", Fill::x(Align::e("AUDIO INS R ")))))))),
(":view/profiles", |state: &App|Box::new({
let views = state.config.views.clone();
let modes = state.config.modes.clone();
Stack::south(move|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
for (index, (id, profile)) in views.read().unwrap().iter().enumerate() {
for (index, (id, profile)) in modes.read().unwrap().iter().enumerate() {
let bg = if index == 0 { Rgb(64,64,64) } else { Rgb(32,32,32) };
let name = profile.mode.name.get(0).map(|x|x.as_ref()).unwrap_or("<no name>");
let info = profile.mode.info.get(0).map(|x|x.as_ref()).unwrap_or("<no info>");
let name = profile.name.get(0).map(|x|x.as_ref()).unwrap_or("<no name>");
let info = profile.info.get(0).map(|x|x.as_ref()).unwrap_or("<no info>");
add(&Fixed::y(3, Tui::bg(bg, Bsp::s(
Fill::x(Bsp::a(
Fill::x(Align::w(Tui::fg(Rgb(224,192,128), name))),