mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +00:00
Piano: Use a real transport in the TrackManager
This is technically only a stepping stone but needed to happen at some point anyways. Now, there's no more integer time stored in Piano's legacy datastructures directly.
This commit is contained in:
parent
37b340a698
commit
7e04560af4
6 changed files with 29 additions and 28 deletions
|
@ -160,7 +160,7 @@ void RollWidget::paint_event(GUI::PaintEvent& event)
|
|||
painter.draw_text(note_name_rect, String::formatted("{}", note / notes_per_octave + 1), Gfx::TextAlignment::CenterLeft);
|
||||
}
|
||||
|
||||
int x = m_roll_width * (static_cast<double>(m_track_manager.time()) / roll_length);
|
||||
int x = m_roll_width * (static_cast<double>(m_track_manager.transport()->time()) / roll_length);
|
||||
if (x > x_offset && x <= x_offset + widget_inner_rect().width())
|
||||
painter.draw_line({ x, 0 }, { x, roll_height }, Gfx::Color::Black);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue