mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-07-17 15:56:57 +02:00
183e...
This commit is contained in:
parent
790e33b40c
commit
9283c54eec
4 changed files with 47 additions and 44 deletions
10
src/tek.rs
10
src/tek.rs
|
|
@ -25,6 +25,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
/// TODO: Preserve the generic passthru syntax;
|
||||
/// remove this macro (only used twice) and potentially the trait.
|
||||
#[macro_export] macro_rules! impl_has_clips {
|
||||
(|$self:ident:$Struct:ident$(<$($L:lifetime),*$($T:ident$(:$U:path)?),*>)?|$cb:expr) => {
|
||||
impl $(<$($L),*$($T $(: $U)?),*>)? HasClips for $Struct $(<$($L),*$($T),*>)? {
|
||||
|
|
@ -139,8 +141,8 @@ pub(crate) use tengri::{
|
|||
}));
|
||||
// TODO: Sync these timings with main clock, so that things
|
||||
// "accidentally" fall on the beat in overload conditions.
|
||||
let keyboard = run_tui_in(&exit, &state, Duration::from_millis(100))?;
|
||||
let terminal = run_tui_out(&exit, &state, Duration::from_millis(10))?;
|
||||
let keyboard = tui_keyboard(&exit, &state, Duration::from_millis(100))?;
|
||||
let terminal = tui_output(&exit, &state, Duration::from_millis(10))?;
|
||||
(keyboard, terminal)
|
||||
})
|
||||
})
|
||||
|
|
@ -518,11 +520,13 @@ pub fn draw_info_v (sample: Option<&Arc<RwLock<Sample>>>) -> impl Draw<Tui> + us
|
|||
w_full(origin_w(field_h(theme, "Gain ", format!("{}", sample.gain)))),
|
||||
)).draw(to)
|
||||
});
|
||||
|
||||
let b = thunk(|to: &mut Tui|fg(Red, south!(
|
||||
bold(true, "× No sample."),
|
||||
"[r] record",
|
||||
"[Shift-F9] import",
|
||||
)));
|
||||
|
||||
either(sample.is_some(), a, b)
|
||||
}
|
||||
|
||||
|
|
@ -547,7 +551,7 @@ pub fn view_ports_status <'a, T: JackPort> (theme: ItemTheme, title: &'a str, po
|
|||
let iter = move||ports.iter();
|
||||
let names = iter_south(iter, move|port, index|h_full(origin_w(format!(" {index} {}", port.port_name()))));
|
||||
let field = field_v(theme, title, names);
|
||||
wh_exact(Some(20), Some(1 + ins), frame.enclose(wh_exact(Some(20), Some(1 + ins), field)))
|
||||
wh_exact(Some(20), Some(1 + ins), border(true, frame, wh_exact(Some(20), Some(1 + ins), field)))
|
||||
}
|
||||
|
||||
pub fn io_ports <'a, T: PortsSizes<'a>> (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue