gui: collapse call blocks by default, click to expand
Tool call args are less interesting than results. Show only the call name with a ▶ toggle; click to expand and see the full args.
This commit is contained in:
parent
29c74b2837
commit
d008a2e6a8
|
|
@ -795,6 +795,8 @@ Item {
|
||||||
Item {
|
Item {
|
||||||
implicitHeight: callLayout.implicitHeight + 12
|
implicitHeight: callLayout.implicitHeight + 12
|
||||||
|
|
||||||
|
property bool expanded: false
|
||||||
|
|
||||||
HoverHandler { id: callHover }
|
HoverHandler { id: callHover }
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -831,13 +833,18 @@ Item {
|
||||||
spacing: 4
|
spacing: 4
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "\u26A1 call: " + (block ? (block.blockName || "") : "")
|
text: (expanded ? "\u25BC" : "\u25B6") + " \u26A1 call: " + (block ? (block.blockName || "") : "")
|
||||||
font.pixelSize: Qt.application.font.pixelSize * 0.8
|
font.pixelSize: Qt.application.font.pixelSize * 0.8
|
||||||
color: "#ff9800"
|
color: "#ff9800"
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: expanded = !expanded
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: block ? block.subBlocks : []
|
model: expanded && block ? block.subBlocks : []
|
||||||
delegate: Loader {
|
delegate: Loader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
property var subBlock: modelData
|
property var subBlock: modelData
|
||||||
|
|
|
||||||
|
|
@ -1644,6 +1644,8 @@ ApplicationWindow {
|
||||||
Item {
|
Item {
|
||||||
implicitHeight: callLayout.implicitHeight + 12
|
implicitHeight: callLayout.implicitHeight + 12
|
||||||
|
|
||||||
|
property bool expanded: false
|
||||||
|
|
||||||
HoverHandler { id: callHover }
|
HoverHandler { id: callHover }
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -1680,13 +1682,18 @@ ApplicationWindow {
|
||||||
spacing: 4
|
spacing: 4
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "\u26A1 call: " + (block ? (block.blockName || "") : "")
|
text: (expanded ? "\u25BC" : "\u25B6") + " \u26A1 call: " + (block ? (block.blockName || "") : "")
|
||||||
font.pixelSize: Qt.application.font.pixelSize * 0.8
|
font.pixelSize: Qt.application.font.pixelSize * 0.8
|
||||||
color: "#ff9800"
|
color: "#ff9800"
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: expanded = !expanded
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: block ? block.subBlocks : []
|
model: expanded && block ? block.subBlocks : []
|
||||||
delegate: Loader {
|
delegate: Loader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
property var subBlock: modelData
|
property var subBlock: modelData
|
||||||
|
|
|
||||||
Reference in New Issue