summaryrefslogtreecommitdiffstats
path: root/framework/qml/SelectableLabel.qml
diff options
context:
space:
mode:
Diffstat (limited to 'framework/qml/SelectableLabel.qml')
-rw-r--r--framework/qml/SelectableLabel.qml28
1 files changed, 12 insertions, 16 deletions
diff --git a/framework/qml/SelectableLabel.qml b/framework/qml/SelectableLabel.qml
index 920f5c7a..308bf3d6 100644
--- a/framework/qml/SelectableLabel.qml
+++ b/framework/qml/SelectableLabel.qml
@@ -23,23 +23,19 @@ import org.kube.framework 1.0 as Kube
23 23
24Kube.Label { 24Kube.Label {
25 id: root 25 id: root
26 MouseArea { 26 Kube.ContextMenuOverlay {
27 id: mouseArea 27 id: menu
28 anchors.fill: parent 28 anchors.fill: parent
29 hoverEnabled: true 29 Kube.TextButton {
30 z: 1 30 id: button
31 } 31 text: qsTr("Copy")
32 Kube.IconButton { 32 onClicked: {
33 anchors { 33 clipboard.text = root.text
34 left: parent.right 34 menu.close()
35 verticalCenter: parent.verticalCenter 35 }
36 } 36 Kube.Clipboard {
37 iconName: Kube.Icons.copy 37 id: clipboard
38 visible: mouseArea.containsMouse || hovered 38 }
39 color: Kube.Colors.backgroundColor
40 onClicked: clipboard.text = root.text
41 Kube.Clipboard {
42 id: clipboard
43 } 39 }
44 } 40 }
45} 41}