mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 12:46:42 +01:00
highlight commands in status bar
This commit is contained in:
parent
66483f8371
commit
727702778b
2 changed files with 73 additions and 32 deletions
|
|
@ -17,14 +17,14 @@ impl Content for TransportToolbar<Tui> {
|
|||
_ => unreachable!(),
|
||||
}
|
||||
).min_xy(11, 2).push_x(1)),
|
||||
self.focus.wrap(self.focused, TransportToolbarFocus::Bpm, &Outset::X(1u16, col! {
|
||||
"BPM", format!("{}.{:03}", self.bpm as usize, (self.bpm * 1000.0) % 1000.0)
|
||||
self.focus.wrap(self.focused, TransportToolbarFocus::Bpm, &Outset::X(1u16, row! {
|
||||
"BPM ", format!("{}.{:03}", self.bpm as usize, (self.bpm * 1000.0) % 1000.0)
|
||||
})),
|
||||
self.focus.wrap(self.focused, TransportToolbarFocus::Quant, &Outset::X(1u16, col! {
|
||||
"QUANT", ppq_to_name(self.quant as usize)
|
||||
self.focus.wrap(self.focused, TransportToolbarFocus::Quant, &Outset::X(1u16, row! {
|
||||
"QUANT ", ppq_to_name(self.quant as usize)
|
||||
})),
|
||||
self.focus.wrap(self.focused, TransportToolbarFocus::Sync, &Outset::X(1u16, col! {
|
||||
"SYNC", ppq_to_name(self.sync as usize)
|
||||
self.focus.wrap(self.focused, TransportToolbarFocus::Sync, &Outset::X(1u16, row! {
|
||||
"SYNC ", ppq_to_name(self.sync as usize)
|
||||
})),
|
||||
self.focus.wrap(self.focused, TransportToolbarFocus::Clock, &{
|
||||
let Self { frame: _frame, pulse, ppq, usecs, .. } = self;
|
||||
|
|
@ -34,7 +34,7 @@ impl Content for TransportToolbar<Tui> {
|
|||
let (minutes, seconds) = (seconds / 60, seconds % 60);
|
||||
let time1 = format!("{bars}.{beats}.{pulses:02}");
|
||||
let time2 = format!("{minutes}:{seconds:02}:{msecs:03}");
|
||||
col!(time1.as_str(), time2.as_str()).outset_x(1)
|
||||
row!(time1.as_str(), time2.as_str()).outset_x(1)
|
||||
}),
|
||||
).fill_x().bg(Color::Rgb(40, 50, 30))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue