Support selected text for replies in the right click menu

Support selected text for replies in the right click menu

BUG: 463885
This commit is contained in:
James Graham
2024-03-28 21:01:21 +00:00
parent 9bf65de649
commit fbb4b962fa
2 changed files with 10 additions and 0 deletions

View File

@@ -175,6 +175,9 @@ DelegateChooser {
onReplyClicked: eventId => { onReplyClicked: eventId => {
root.replyClicked(eventId); root.replyClicked(eventId);
} }
onSelectedTextChanged: selectedText => {
root.selectedTextChanged(selectedText);
}
} }
} }

View File

@@ -84,6 +84,11 @@ RowLayout {
*/ */
signal replyClicked(string eventID) signal replyClicked(string eventID)
/**
* @brief The user selected text has changed.
*/
signal selectedTextChanged(string selectedText)
implicitHeight: contentColumn.implicitHeight implicitHeight: contentColumn.implicitHeight
spacing: Kirigami.Units.largeSpacing spacing: Kirigami.Units.largeSpacing
@@ -136,6 +141,8 @@ RowLayout {
display: root.replyDisplay display: root.replyDisplay
maxContentWidth: _private.availableContentWidth maxContentWidth: _private.availableContentWidth
onSelectedTextChanged: root.selectedTextChanged(selectedText)
HoverHandler { HoverHandler {
enabled: !hoveredLink enabled: !hoveredLink
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor