mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-11-13 13:32:55 -05:00
feat: Add open link to text block context menu
This commit is contained in:
@ -33,12 +33,22 @@ TextEdit {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.RightButton
|
||||
onClicked: contextMenu.open()
|
||||
propagateComposedEvents: true
|
||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.IBeamCursor
|
||||
}
|
||||
|
||||
Platform.Menu {
|
||||
id: contextMenu
|
||||
|
||||
Platform.MenuItem {
|
||||
text: qsTr("Open Link")
|
||||
visible: root.hoveredLink.length > 0
|
||||
onTriggered: Qt.openUrlExternally(root.hoveredLink)
|
||||
}
|
||||
|
||||
Platform.MenuSeparator {
|
||||
visible: root.hoveredLink.length > 0
|
||||
}
|
||||
|
||||
Platform.MenuItem {
|
||||
text: qsTr("Copy")
|
||||
enabled: root.selectedText.length > 0
|
||||
|
||||
Reference in New Issue
Block a user