midi_edit: FieldH -> FieldV

This commit is contained in:
🪞👃🪞 2025-04-13 23:35:29 +03:00
parent 5097b61c7f
commit 83b82c9572

View file

@ -134,9 +134,9 @@ impl MidiEditor {
let (color, name, length, looped) = if let Some(clip) = self.clip().as_ref().map(|p|p.read().unwrap()) {
(clip.color, clip.name.clone(), clip.length, clip.looped)
} else { (ItemPalette::G[64], String::new().into(), 0, false) };
row!(
FieldV(color, "Edit", format!("{name} ({length})")),
FieldV(color, "Loop", looped.to_string())
Bsp::e(
FieldH(color, "Edit", format!("{name} ({length})")),
FieldH(color, "Loop", looped.to_string())
)
}
pub fn edit_status (&self) -> impl Content<TuiOut> + '_ {
@ -150,8 +150,8 @@ impl MidiEditor {
let note_name = format!("{:4}", Note::pitch_to_name(self.note_pos()));
let note_len = format!("{:>4}", self.note_len());
Bsp::e(
FieldV(color, "Time", format!("{length}/{time_zoom}+{time_pos} {time_lock}")),
FieldV(color, "Note", format!("{note_name} {note_pos} {note_len}")),
FieldH(color, "Time", format!("{length}/{time_zoom}+{time_pos} {time_lock}")),
FieldH(color, "Note", format!("{note_name} {note_pos} {note_len}")),
)
}
}