forked from qt-creator/qt-creator
QmlProfiler: Don't modify height of timeline items based on row height
When precomputing all timeline items in advance we cannot react to height changes later Change-Id: Ib038fb59581fe8367c1c550839a728f371005ab6 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
@@ -174,16 +174,9 @@ QColor QmlProfilerAnimationsModel::color(int index) const
|
||||
|
||||
float QmlProfilerAnimationsModel::relativeHeight(int index) const
|
||||
{
|
||||
const int thread = selectionId(index);
|
||||
|
||||
// Add some height to the events if we're far from the scale threshold of 2 * DefaultRowHeight.
|
||||
// Like that you can see the smaller events more easily.
|
||||
int scaleThreshold = 2 * defaultRowHeight() - rowHeight(rowFromThreadId(thread));
|
||||
float boost = scaleThreshold > 0 ? (0.15 * scaleThreshold / defaultRowHeight()) : 0;
|
||||
|
||||
return boost + (1.0 - boost) * (float)m_data[index].animationcount /
|
||||
(float)(thread == QmlDebug::GuiThread ? m_maxGuiThreadAnimations :
|
||||
m_maxRenderThreadAnimations);
|
||||
return (float)m_data[index].animationcount / (float)(selectionId(index) == QmlDebug::GuiThread ?
|
||||
m_maxGuiThreadAnimations :
|
||||
m_maxRenderThreadAnimations);
|
||||
}
|
||||
|
||||
QVariantList QmlProfilerAnimationsModel::labels() const
|
||||
|
||||
Reference in New Issue
Block a user