2017-08-29 23:58:49 +02:00
|
|
|
import QtQuick 2.7
|
|
|
|
import QtQuick.Layouts 1.1
|
|
|
|
import org.kde.plasma.components 2.0 as PlasmaComponents
|
|
|
|
|
|
|
|
RowLayout {
|
2017-10-01 17:49:48 +02:00
|
|
|
id: detailItem
|
|
|
|
property string detailName: name ? name : ""
|
|
|
|
property string detailValue: detail ? detail : ""
|
|
|
|
|
2017-08-29 23:58:49 +02:00
|
|
|
PlasmaComponents.Label {
|
|
|
|
Layout.preferredWidth: 100
|
2017-09-09 21:40:00 +02:00
|
|
|
Layout.leftMargin: units.iconSizes.smallMedium
|
2017-10-01 17:49:48 +02:00
|
|
|
text: detailName
|
2017-09-09 21:40:00 +02:00
|
|
|
font.pointSize: theme.defaultFont.pointSize * 0.8
|
2017-08-29 23:58:49 +02:00
|
|
|
elide: Text.ElideRight
|
|
|
|
}
|
|
|
|
PlasmaComponents.Label {
|
|
|
|
Layout.fillWidth: true
|
2017-10-01 17:49:48 +02:00
|
|
|
text: detailValue
|
2017-09-09 21:40:00 +02:00
|
|
|
font.pointSize: theme.defaultFont.pointSize * 0.8
|
2017-08-29 23:58:49 +02:00
|
|
|
elide: Text.ElideRight
|
|
|
|
}
|
2017-10-01 17:49:48 +02:00
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
acceptedButtons: Qt.RightButton
|
|
|
|
onClicked: {
|
|
|
|
var view = detailItem.ListView.view
|
|
|
|
var coordinates = mapToItem(view, mouseX, mouseY)
|
|
|
|
view.showContextMenu(detailItem, coordinates.x, coordinates.y)
|
|
|
|
}
|
|
|
|
}
|
2017-08-29 23:58:49 +02:00
|
|
|
}
|