vscroll seq pt.5: note axis start by 2

This commit is contained in:
🪞👃🪞 2024-10-29 09:17:02 +02:00
parent ac65cea371
commit 6d7577553a
2 changed files with 3 additions and 3 deletions

View file

@ -275,7 +275,7 @@ impl<E: Engine> PhraseEditor<E> {
axis.point_dec(1);
if let Some(point) = axis.point {
if point < axis.start {
axis.start = point;
axis.start = (point / 2) * 2;
}
}
}

View file

@ -78,8 +78,8 @@ impl Content for PhraseEditor<Tui> {
self.height.store(h, Ordering::Relaxed);
let mut axis = self.note_axis.write().unwrap();
if let Some(point) = axis.point {
if point.saturating_sub(axis.start) >= (h * 2).saturating_sub(1) {
axis.start += 1;
if point.saturating_sub(axis.start) > (h * 2).saturating_sub(1) {
axis.start += 2;
}
}
if to.area().h() >= 2 {