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:
@@ -119,7 +119,7 @@ void TimelineViewBlockItem::paint(QPainter *painter, const QStyleOptionGraphicsI
|
||||
painter->setPen(Qt::lightGray);
|
||||
}
|
||||
|
||||
int text_top = TrackOutput::GetTrackHeightMinimum() / 2 - painter->fontMetrics().height() / 2;
|
||||
int text_top = TrackOutput::GetMinimumTrackHeightInPixels() / 2 - painter->fontMetrics().height() / 2;
|
||||
QRectF text_rect = rect();
|
||||
text_rect.adjust(0, text_top, 0, 0);
|
||||
painter->drawText(text_rect, Qt::AlignLeft | Qt::AlignTop, block_->GetLabel());
|
||||
|
||||
Reference in New Issue
Block a user