mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
fill editor area!
This commit is contained in:
parent
c83f949f53
commit
2b08738992
3 changed files with 10 additions and 9 deletions
|
|
@ -120,7 +120,7 @@ render!(<Tui>|self: ArrangerTui|{
|
||||||
});
|
});
|
||||||
with_size(with_status(with_editbar(with_pool(with_transport(col!([
|
with_size(with_status(with_editbar(with_pool(with_transport(col!([
|
||||||
Fill::w(Fixed::h(20, arranger())),
|
Fill::w(Fixed::h(20, arranger())),
|
||||||
Fill::w(Fixed::h(25, &self.editor)),
|
Fill::wh(&self.editor),
|
||||||
]))))))
|
]))))))
|
||||||
});
|
});
|
||||||
audio!(|self: ArrangerTui, client, scope|{
|
audio!(|self: ArrangerTui, client, scope|{
|
||||||
|
|
|
||||||
|
|
@ -83,20 +83,21 @@ render!(<Tui>|self: TransportView|{
|
||||||
let color = self.color;
|
let color = self.color;
|
||||||
struct Field<'a>(&'a str, &'a str, &'a ItemPalette);
|
struct Field<'a>(&'a str, &'a str, &'a ItemPalette);
|
||||||
render!(<Tui>|self: Field<'a>|row!([
|
render!(<Tui>|self: Field<'a>|row!([
|
||||||
Tui::fg_bg(self.2.lightest.rgb, self.2.darkest.rgb, Tui::bold(true, self.0)),
|
Tui::fg_bg(self.2.lightest.rgb, self.2.base.rgb, Tui::bold(true, self.0)),
|
||||||
Tui::fg_bg(self.2.lighter.rgb, self.2.darkest.rgb, "│"),
|
Tui::fg_bg(self.2.base.rgb, self.2.darkest.rgb, "▌"),
|
||||||
Tui::fg_bg(self.2.lighter.rgb, self.2.base.rgb, format!("{:>10}", self.1)),
|
Tui::fg_bg(self.2.lightest.rgb, self.2.darkest.rgb, format!("{:>10}", self.1)),
|
||||||
|
Tui::fg_bg(self.2.darkest.rgb, self.2.base.rgb, "▌"),
|
||||||
]));
|
]));
|
||||||
Tui::bg(color.base.rgb, Fill::w(row!([
|
Tui::bg(color.base.rgb, Fill::w(row!([
|
||||||
//PlayPause(self.started), " ",
|
//PlayPause(self.started), " ",
|
||||||
col!([
|
col!([
|
||||||
Field(" Beat", self.beat.as_str(), &color),
|
Field(" Beat", self.beat.as_str(), &color),
|
||||||
Field(" BPM", self.bpm.as_str(), &color),
|
Field(" BPM", self.bpm.as_str(), &color),
|
||||||
]),
|
]),
|
||||||
" ",
|
" ",
|
||||||
col!([
|
col!([
|
||||||
Field(" Time", format!("{:.1}s", self.current_second).as_str(), &color),
|
Field("Time", format!("{:.1}s", self.current_second).as_str(), &color),
|
||||||
Field(" Smpl", format!("{:.1}k", self.current_sample).as_str(), &color),
|
Field("Smpl", format!("{:.1}k", self.current_sample).as_str(), &color),
|
||||||
]),
|
]),
|
||||||
])))
|
])))
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ impl PianoHorizontal {
|
||||||
}
|
}
|
||||||
|
|
||||||
let time_end = time_start + zoom;
|
let time_end = time_start + zoom;
|
||||||
for time in time_start..time_end {
|
for time in time_start..time_end.min(phrase.length) {
|
||||||
for event in phrase.notes[time].iter() {
|
for event in phrase.notes[time].iter() {
|
||||||
match event {
|
match event {
|
||||||
MidiMessage::NoteOn { key, .. } => {
|
MidiMessage::NoteOn { key, .. } => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue