mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 12:46:42 +01:00
add FieldV
This commit is contained in:
parent
52e34ce8a7
commit
c9a79b1f29
3 changed files with 34 additions and 14 deletions
|
|
@ -33,11 +33,11 @@ impl<'a> TransportView<'a> {
|
|||
render!(Tui: (self: TransportView<'a>) => Outer(
|
||||
Style::default().fg(TuiTheme::g(255)).bg(TuiTheme::g(0))
|
||||
).enclose(row!(
|
||||
BeatStats::new(self.compact, self.clock),
|
||||
" ",
|
||||
PlayPause { compact: self.compact, playing: self.clock.is_rolling() },
|
||||
" ",
|
||||
OutputStats::new(self.compact, self.clock),
|
||||
" ",
|
||||
PlayPause { compact: false, playing: self.clock.is_rolling() },
|
||||
" ",
|
||||
BeatStats::new(self.compact, self.clock),
|
||||
)));
|
||||
|
||||
pub struct PlayPause { pub compact: bool, pub playing: bool }
|
||||
|
|
@ -66,9 +66,9 @@ impl BeatStats {
|
|||
}
|
||||
render!(Tui: (self: BeatStats) => Tui::either(self.compact,
|
||||
row!(
|
||||
Field(TuiTheme::g(128).into(), "BPM", &self.bpm),
|
||||
Field(TuiTheme::g(128).into(), "Beat", &self.beat),
|
||||
Field(TuiTheme::g(128).into(), "Time", &self.time),
|
||||
FieldV(TuiTheme::g(128).into(), "BPM", &self.bpm),
|
||||
FieldV(TuiTheme::g(128).into(), "Beat", &self.beat),
|
||||
FieldV(TuiTheme::g(128).into(), "Time", &self.time),
|
||||
),
|
||||
col!(
|
||||
Bsp::e(Tui::fg(TuiTheme::g(255), &self.bpm), " BPM"),
|
||||
|
|
@ -95,9 +95,9 @@ impl OutputStats {
|
|||
}
|
||||
render!(Tui: (self: OutputStats) => Tui::either(self.compact,
|
||||
row!(
|
||||
Field(TuiTheme::g(128).into(), "SR", &self.sample_rate),
|
||||
Field(TuiTheme::g(128).into(), "Buf", &self.buffer_size),
|
||||
Field(TuiTheme::g(128).into(), "Lat", &self.latency),
|
||||
FieldV(TuiTheme::g(128).into(), "SR", &self.sample_rate),
|
||||
FieldV(TuiTheme::g(128).into(), "Buf", &self.buffer_size),
|
||||
FieldV(TuiTheme::g(128).into(), "Lat", &self.latency),
|
||||
),
|
||||
col!(
|
||||
Bsp::e(Tui::fg(TuiTheme::g(255), format!("{}", self.sample_rate)), " sample rate"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue