mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
new minimal transport bar
This commit is contained in:
parent
d4c96f4b41
commit
7f57465b3a
5 changed files with 141 additions and 376 deletions
|
|
@ -1,14 +1,9 @@
|
|||
use crate::*;
|
||||
use super::*;
|
||||
|
||||
mod piano_h_cursor;
|
||||
use self::piano_h_cursor::*;
|
||||
|
||||
mod piano_h_keys;
|
||||
pub(crate) use self::piano_h_keys::*;
|
||||
|
||||
mod piano_h_cursor; use self::piano_h_cursor::*;
|
||||
mod piano_h_keys; pub(crate) use self::piano_h_keys::*;
|
||||
mod piano_h_notes; use self::piano_h_notes::*;
|
||||
|
||||
mod piano_h_time; use self::piano_h_time::*;
|
||||
|
||||
pub(crate) fn note_y_iter (note_lo: usize, note_hi: usize, y0: u16) -> impl Iterator<Item=(usize, u16, usize)> {
|
||||
|
|
@ -59,41 +54,40 @@ render!(Tui: (self: PianoHorizontal) => {
|
|||
} else {
|
||||
(ItemPalette::from(TuiTheme::g(64)), String::new(), 0, false)
|
||||
};
|
||||
let field = move|x, y|row!(
|
||||
Tui::fg_bg(color.lighter.rgb, color.darker.rgb, Tui::bold(true, x)),
|
||||
Tui::fg_bg(color.lighter.rgb, color.dark.rgb, y),
|
||||
);
|
||||
//let field = move|x, y|row!(
|
||||
//Tui::fg_bg(color.lighter.rgb, color.darker.rgb, Tui::bold(true, x)),
|
||||
//Tui::fg_bg(color.lighter.rgb, color.dark.rgb, y),
|
||||
//);
|
||||
let keys_width = 5;
|
||||
let keys = move||PianoHorizontalKeys(self);
|
||||
let timeline = move||PianoHorizontalTimeline(self);
|
||||
let notes = move||PianoHorizontalNotes(self);
|
||||
let cursor = move||PianoHorizontalCursor(self);
|
||||
let border = Fill::xy(Outer(Style::default().fg(self.color.dark.rgb).bg(self.color.darkest.rgb)));
|
||||
let with_border = |x|lay!(border, Padding::xy(0, 0, x));
|
||||
with_border(lay!(
|
||||
Push::x(0, row!(
|
||||
//" ",
|
||||
field("Edit:", name.to_string()), " ",
|
||||
field("Length:", length.to_string()), " ",
|
||||
field("Loop:", looped.to_string())
|
||||
)),
|
||||
Padding::xy(0, 1, Fill::xy(Bsp::s(
|
||||
Fixed::y(1, Bsp::e(
|
||||
Fixed::x(self.keys_width, ""),
|
||||
Fill::x(timeline()),
|
||||
)),
|
||||
Bsp::e(
|
||||
Fixed::x(self.keys_width, keys()),
|
||||
Fill::xy(lay!(
|
||||
&self.size,
|
||||
Fill::xy(lay!(
|
||||
Fill::xy(notes()),
|
||||
Fill::xy(cursor()),
|
||||
))
|
||||
)),
|
||||
),
|
||||
)))
|
||||
))
|
||||
Outer(Style::default().fg(self.color.dark.rgb).bg(self.color.darkest.rgb)).enclose("kyp");
|
||||
//with_border(lay!(
|
||||
//Push::x(0, row!(
|
||||
////" ",
|
||||
//field("Edit:", name.to_string()), " ",
|
||||
//field("Length:", length.to_string()), " ",
|
||||
//field("Loop:", looped.to_string())
|
||||
//)),
|
||||
//Padding::xy(0, 1, Fill::xy(Bsp::s(
|
||||
//Fixed::y(1, Bsp::e(
|
||||
//Fixed::x(self.keys_width, ""),
|
||||
//Fill::x(timeline()),
|
||||
//)),
|
||||
//Bsp::e(
|
||||
//Fixed::x(self.keys_width, keys()),
|
||||
//Fill::xy(lay!(
|
||||
//&self.size,
|
||||
//Fill::xy(lay!(
|
||||
//Fill::xy(notes()),
|
||||
//Fill::xy(cursor()),
|
||||
//))
|
||||
//)),
|
||||
//),
|
||||
//)))
|
||||
//))
|
||||
});
|
||||
|
||||
impl PianoHorizontal {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue