forked from qt-creator/qt-creator
QmlProfiler: rename relative height of timeline items to "relativeHeight"
This clarifies that the item height is not absolute but relative to the row height, and it reduces the ambiguity of the various "height" methods. Change-Id: I391441147c88b47a14e539fc3853702bb517d27b Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -174,7 +174,7 @@ void TimelineRenderer::drawItemsToPainter(QPainter *p, int modelIndex, int fromI
|
||||
continue;
|
||||
|
||||
itemHeight = m_profilerModelProxy->rowHeight(modelIndex, rowNumber) *
|
||||
m_profilerModelProxy->height(modelIndex, i);
|
||||
m_profilerModelProxy->relativeHeight(modelIndex, i);
|
||||
|
||||
currentY += m_profilerModelProxy->rowHeight(modelIndex, rowNumber) - itemHeight;
|
||||
if (currentY + itemHeight < 0)
|
||||
@@ -220,7 +220,7 @@ void TimelineRenderer::drawSelectionBoxes(QPainter *p, int modelIndex, int fromI
|
||||
|
||||
int row = m_profilerModelProxy->row(modelIndex, i);
|
||||
int rowHeight = m_profilerModelProxy->rowHeight(modelIndex, row);
|
||||
int itemHeight = rowHeight * m_profilerModelProxy->height(modelIndex, i);
|
||||
int itemHeight = rowHeight * m_profilerModelProxy->relativeHeight(modelIndex, i);
|
||||
|
||||
currentY = modelRowStart + m_profilerModelProxy->rowOffset(modelIndex, row) + rowHeight -
|
||||
itemHeight - y();
|
||||
|
||||
Reference in New Issue
Block a user