diff --git a/applet/contents/ui/ConnectionItem.qml b/applet/contents/ui/ConnectionItem.qml --- a/applet/contents/ui/ConnectionItem.qml +++ b/applet/contents/ui/ConnectionItem.qml @@ -52,11 +52,16 @@ enabled: true height: expanded ? baseHeight + separator.height + expandableComponentLoader.height + (2 * Math.round(units.gridUnit / 3)) : baseHeight - ColumnLayout { + Item { anchors.fill: parent RowLayout { - Layout.fillWidth: true + id: itemMainLayout + anchors { + left: parent.left + top: parent.top + right: parent.right + } spacing: Math.round(units.gridUnit / 2) PlasmaCore.SvgItem { @@ -120,31 +125,38 @@ } } - PlasmaCore.SvgItem { - id: separator - height: lineSvg.elementSize("horizontal-line").height - Layout.fillWidth: true - Layout.maximumHeight: height - elementId: "horizontal-line" - svg: PlasmaCore.Svg { id: lineSvg; imagePath: "widgets/line" } - visible: connectionItem.expanded - opacity: visible + MouseArea { + acceptedButtons: Qt.RightButton + anchors.fill: itemMainLayout + onPressed: { + contextMenu.visualParent = itemMainLayout + contextMenu.open(mouse.x, mouse.y) + } } - Loader { - id: expandableComponentLoader - Layout.fillHeight: true - Layout.fillWidth: true - height: childrenRect.height - } - } + ColumnLayout { + anchors { + left: parent.left + top: itemMainLayout.bottom + right: parent.right + } - MouseArea { - acceptedButtons: Qt.RightButton - anchors.fill: parent - onPressed: { - contextMenu.visualParent = parent - contextMenu.open() + PlasmaCore.SvgItem { + id: separator + height: lineSvg.elementSize("horizontal-line").height + Layout.fillWidth: true + Layout.maximumHeight: height + elementId: "horizontal-line" + svg: PlasmaCore.Svg { id: lineSvg; imagePath: "widgets/line" } + visible: connectionItem.expanded + opacity: visible + } + + Loader { + id: expandableComponentLoader + Layout.fillWidth: true + height: childrenRect.height + } } }