mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
format phrase length as B.B.TT
This commit is contained in:
parent
7a6bdf2764
commit
05e0299f5f
1 changed files with 4 additions and 1 deletions
|
|
@ -17,9 +17,12 @@ impl Content for PhrasePool<Tui> {
|
|||
let content = col!(
|
||||
(i, phrase) in self.phrases.iter().enumerate() => Layers::new(|add|{
|
||||
let Phrase { ref name, color, length, .. } = *phrase.read().unwrap();
|
||||
let ticks = length % PPQ;
|
||||
let beats = length % (4 * PPQ);
|
||||
let bars = length / (4 * PPQ);
|
||||
let row1 = lay!(
|
||||
format!(" {i}").align_w().fill_x(),
|
||||
format!("{length} ").align_e().fill_x(),
|
||||
format!("{bars}.{beats}.{ticks:>02} ").align_e().fill_x(),
|
||||
).fill_x();
|
||||
let row2 = if let Some(PhrasePoolMode::Rename(phrase, _)) = self.mode {
|
||||
if self.focused && i == phrase {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue