mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
add Measure::of
This commit is contained in:
parent
6b073988c2
commit
5b57f2b998
4 changed files with 21 additions and 54 deletions
|
|
@ -11,67 +11,30 @@ 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 keys_width = 5;
|
||||
let keys = move||PianoHorizontalKeys(self);
|
||||
let timeline = move||PianoHorizontalTimeline(self);
|
||||
let notes = move||PianoHorizontalNotes(self);
|
||||
let cursor = move||PianoHorizontalCursor(self);
|
||||
let status = move||row!(
|
||||
//" ",
|
||||
row!("Edit:", name.to_string()), " ",
|
||||
row!("Length:", length.to_string()), " ",
|
||||
row!("Loop:", looped.to_string())
|
||||
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),
|
||||
);
|
||||
Bsp::s(
|
||||
Fixed::y(1, status()),
|
||||
Fixed::y(1, row!(
|
||||
field("Edit:", name.to_string()), " ",
|
||||
field("Length:", length.to_string()), " ",
|
||||
field("Loop:", looped.to_string())
|
||||
)),
|
||||
Bsp::s(
|
||||
Fixed::y(1, Bsp::e(
|
||||
Fixed::x(self.keys_width, ""),
|
||||
Fill::x(timeline()),
|
||||
Fill::x(PianoHorizontalTimeline(self)),
|
||||
)),
|
||||
Fill::xy(Bsp::e(
|
||||
Fixed::x(self.keys_width, keys()),
|
||||
Fill::xy("test")
|
||||
//Fill::xy(lay!(
|
||||
//&self.size,
|
||||
//Fill::xy(lay!(
|
||||
//Fill::xy(notes()),
|
||||
//Fill::xy(cursor()),
|
||||
//))
|
||||
//)),
|
||||
Fixed::x(self.keys_width, PianoHorizontalKeys(self)),
|
||||
Fill::xy(self.size.of(lay!(
|
||||
Fill::xy(PianoHorizontalNotes(self)),
|
||||
Fill::xy(PianoHorizontalCursor(self)),
|
||||
))),
|
||||
)),
|
||||
)
|
||||
)
|
||||
//"kyp"
|
||||
//Outer(Style::default().fg(self.color.dark.rgb).bg(self.color.darkest.rgb)).enclose("kyp");
|
||||
//with_border(lay!(
|
||||
//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