diff --git a/gui/ChatPane.qml b/gui/ChatPane.qml index 27c0d2f..de6ed94 100644 --- a/gui/ChatPane.qml +++ b/gui/ChatPane.qml @@ -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 diff --git a/gui/main-kf5.qml b/gui/main-kf5.qml index dd53882..27293df 100644 --- a/gui/main-kf5.qml +++ b/gui/main-kf5.qml @@ -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