Commit 5000fc97 authored by Valerio Pilo's avatar Valerio Pilo

Fix connections' context menus position and parent

Summary:
A connection's context menu now opens only from the main item, not from the expanded details;
this allows again copying the connection information (as per comments in D18504).

Reviewers: broulik, jgrulich

Reviewed By: jgrulich

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D18745
parent b7ac6986
......@@ -118,36 +118,42 @@ PlasmaComponents.ListItem {
onClicked: changeState()
}
}
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
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
width: parent.width
height: parent.height
onPressed: {
contextMenu.visualParent = parent
contextMenu.open(mouse.x, mouse.y)
}
}
}
Loader {
id: expandableComponentLoader
ColumnLayout {
Layout.fillHeight: true
Layout.fillWidth: true
height: childrenRect.height
}
}
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: parent
onPressed: {
contextMenu.visualParent = parent
contextMenu.open()
Loader {
id: expandableComponentLoader
Layout.fillHeight: true
Layout.fillWidth: true
height: childrenRect.height
}
}
}
PlasmaComponents.Menu {
id: contextMenu
PlasmaComponents.MenuItem {
......
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