diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-07-20 13:02:41 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-07-22 12:43:25 +0000 |
commit | 15c2b29968c429211f6dd6a4dd05115fc25e052b (patch) | |
tree | 04872a406d09e51552f0205000fc20fede44a62f /src/plugins/qmlprofiler/qml | |
parent | a1852505294a5d6c53abdb7770119b6e51c576ab (diff) |
FlameGraph: Make sure the bottom row can be hidden
The height calculations would subtract the second row's itemHeight from
the bottom row's height, which made the second row stay in place even
if the bottom row's itemHeight was 0.
Change-Id: I93479dcef0230e2b722c147e3c8b25484620a11b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler/qml')
-rw-r--r-- | src/plugins/qmlprofiler/qml/QmlProfilerFlameGraphView.qml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/qmlprofiler/qml/QmlProfilerFlameGraphView.qml b/src/plugins/qmlprofiler/qml/QmlProfilerFlameGraphView.qml index 73b28b345bd..1fe10a230f2 100644 --- a/src/plugins/qmlprofiler/qml/QmlProfilerFlameGraphView.qml +++ b/src/plugins/qmlprofiler/qml/QmlProfilerFlameGraphView.qml @@ -61,7 +61,7 @@ ScrollView { boundsBehavior: Flickable.StopAtBounds FlameGraph { - property int itemHeight: Math.max(30, flickable.height / depth) + property int delegateHeight: Math.max(30, flickable.height / depth) property color blue: "blue" property color blue1: Qt.lighter(blue) property color blue2: Qt.rgba(0.375, 0, 1, 1) @@ -73,7 +73,7 @@ ScrollView { id: flamegraph width: parent.width - height: depth * itemHeight + height: depth * delegateHeight model: flameGraphModel sizeRole: root.sizeRole sizeThreshold: 0.002 @@ -88,7 +88,7 @@ ScrollView { property bool rangeTypeVisible: root.visibleRangeTypes & (1 << FlameGraph.data(QmlProfilerFlameGraphModel.RangeTypeRole)) - itemHeight: rangeTypeVisible ? flamegraph.itemHeight : 0 + itemHeight: rangeTypeVisible ? flamegraph.delegateHeight : 0 isSelected: typeId !== -1 && typeId === root.selectedTypeId && rangeTypeVisible borderColor: { |