track: store height in "units" rather than pixels

Fixes DPI scalability issue if a project ever moved from a display with
one DPI to another.
This commit is contained in:
itsmattkc
2020-08-22 00:23:46 +10:00
parent 48ac8ea509
commit f0928814fc
8 changed files with 63 additions and 42 deletions
+2 -2
View File
@@ -573,7 +573,7 @@ void TimelineWidget::IncreaseTrackHeight()
// Increase the height of each track by one "unit"
foreach (TrackOutput* t, all_tracks) {
t->SetTrackHeight(t->GetTrackHeight() + t->GetTrackHeightIncrement());
t->SetTrackHeight(t->GetTrackHeight() + TrackOutput::kTrackHeightInterval);
}
}
@@ -587,7 +587,7 @@ void TimelineWidget::DecreaseTrackHeight()
// Decrease the height of each track by one "unit"
foreach (TrackOutput* t, all_tracks) {
t->SetTrackHeight(qMax(t->GetTrackHeight() - t->GetTrackHeightIncrement(), t->GetTrackHeightMinimum()));
t->SetTrackHeight(qMax(t->GetTrackHeight() - TrackOutput::kTrackHeightInterval, TrackOutput::kTrackHeightMinimum));
}
}