Commit 8c080e90 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Make timeline expand buttons actual Button items



It looks better, both in the code and in the result.

Change-Id: I5d24b24de429fb6a6d15c2df97f977924bb9fb00
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 2b362de0
......@@ -191,23 +191,16 @@ Item {
}
}
Image {
source: expanded ? "arrow_down.png" : "arrow_right.png"
x: parent.width - 12
y: 9
smooth: false
MouseArea {
anchors.fill: parent
anchors.rightMargin: -10
anchors.leftMargin: -10
anchors.topMargin: -10
anchors.bottomMargin: -10
onClicked: {
// Don't try to expand empty models.
if (expanded || qmlProfilerModelProxy.count(modelIndex) > 0)
qmlProfilerModelProxy.setExpanded(modelIndex, !expanded);
}
}
ToolButton {
id: expandButton
anchors.verticalCenter: txt.verticalCenter
anchors.right: parent.right
implicitWidth: 17
implicitHeight: txt.height - 1
enabled: expanded || trigger(qmlProfilerModelProxy.count(modelIndex)) > 0
iconSource: expanded ? "arrow_down.png" : "arrow_right.png"
tooltip: qsTr(expanded ? "Collapse category" : "Expand category.")
onClicked: qmlProfilerModelProxy.setExpanded(modelIndex, !expanded);
}
Rectangle {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment