diff --git a/AppBar.qml b/AppBar.qml index 6a80fe4..131d9a1 100644 --- a/AppBar.qml +++ b/AppBar.qml @@ -30,7 +30,7 @@ Rectangle { Text { id: headerText - text: "Counter v2.4.5" + text: "Counter v2.5.0" font.family: robotoMediumFont.name font.pointSize: 15 color: "white" diff --git a/main.qml b/main.qml index ee4ecbd..4223b3b 100644 --- a/main.qml +++ b/main.qml @@ -240,6 +240,44 @@ ApplicationWindow { wrapMode: Text.WrapAnywhere placeholderText: qsTr("Введите текст...") selectByMouse: true + anchors.fill: input + + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.LeftButton | Qt.RightButton + onPressed: mouse.button === Qt.RightButton ? firstContextMenu.popup() : input.forceActiveFocus() + } + + Menu { + id: firstContextMenu + Action { + text: qsTr("Cut") + onTriggered: { + input.cut() + } + } + + Action { + text: qsTr("Copy") + onTriggered: { + input.copy() + } + } + + Action { + text: qsTr("Paste") + onTriggered: { + input.paste() + } + } + + Action { + text: qsTr("Delete") + onTriggered: { + input.deleteLater() + } + } + } } }