Skip to content

Commit

Permalink
Add a context menu for the sharees search field
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Oct 18, 2024
1 parent 2d30024 commit b0cedbe
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/gui/filedetails/ShareeSearchField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ TextField {
}
}
}
onPressed: function(mouse) {
if (mouse.button !== Qt.RightButton) return;
contextMenu.popup(mouse.x, mouse.y);
}

leftPadding: searchIcon.width + searchIcon.anchors.leftMargin + horizontalPaddingOffset
rightPadding: clearTextButton.width + clearTextButton.anchors.rightMargin + horizontalPaddingOffset
Expand Down Expand Up @@ -165,6 +169,23 @@ TextField {
}
}

Menu {
id: contextMenu
MenuItem {
text: qsTr("Cut")
onTriggered: root.cut()
}
MenuItem {
text: qsTr("Copy")
onTriggered: root.copy()
}
MenuItem {
text: qsTr("Paste")
onTriggered: root.paste()
}
}


Popup {
id: suggestionsPopup

Expand Down

0 comments on commit b0cedbe

Please sign in to comment.