You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
wow-app/components/ContextMenu.qml

41 lines
947 B

import QtQuick 2.9
import QtQuick.Controls 2.2
import FontAwesome 1.0
import "../components" as MoneroComponents
MouseArea {
signal paste()
id: root
acceptedButtons: Qt.RightButton
anchors.fill: parent
onClicked: {
if (mouse.button === Qt.RightButton)
contextMenu.open()
}
Menu {
id: contextMenu
background: Rectangle {
border.color: MoneroComponents.Style.buttonBackgroundColorDisabledHover
border.width: 1
radius: 2
color: MoneroComponents.Style.buttonBackgroundColorDisabled
}
padding: 1
width: 100
x: root.mouseX
y: root.mouseY
MoneroComponents.ContextMenuItem {
enabled: root.parent.canPaste === true
glyphIcon: FontAwesome.paste
onTriggered: root.paste()
text: qsTr("Paste") + translationManager.emptyString
}
}
}