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:
Levi Neely 2026-07-29 16:23:37 +02:00
parent 29c74b2837
commit d008a2e6a8
2 changed files with 18 additions and 4 deletions

View File

@ -795,6 +795,8 @@ Item {
Item {
implicitHeight: callLayout.implicitHeight + 12
property bool expanded: false
HoverHandler { id: callHover }
Rectangle {
@ -831,13 +833,18 @@ Item {
spacing: 4
Label {
text: "\u26A1 call: " + (block ? (block.blockName || "") : "")
text: (expanded ? "\u25BC" : "\u25B6") + " \u26A1 call: " + (block ? (block.blockName || "") : "")
font.pixelSize: Qt.application.font.pixelSize * 0.8
color: "#ff9800"
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: expanded = !expanded
}
}
Repeater {
model: block ? block.subBlocks : []
model: expanded && block ? block.subBlocks : []
delegate: Loader {
Layout.fillWidth: true
property var subBlock: modelData

View File

@ -1644,6 +1644,8 @@ ApplicationWindow {
Item {
implicitHeight: callLayout.implicitHeight + 12
property bool expanded: false
HoverHandler { id: callHover }
Rectangle {
@ -1680,13 +1682,18 @@ ApplicationWindow {
spacing: 4
Label {
text: "\u26A1 call: " + (block ? (block.blockName || "") : "")
text: (expanded ? "\u25BC" : "\u25B6") + " \u26A1 call: " + (block ? (block.blockName || "") : "")
font.pixelSize: Qt.application.font.pixelSize * 0.8
color: "#ff9800"
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: expanded = !expanded
}
}
Repeater {
model: block ? block.subBlocks : []
model: expanded && block ? block.subBlocks : []
delegate: Loader {
Layout.fillWidth: true
property var subBlock: modelData