diff --git a/imports/NeoChat/Component/Timeline/TextDelegate.qml b/imports/NeoChat/Component/Timeline/TextDelegate.qml index 5770ef3d1..5273a4919 100644 --- a/imports/NeoChat/Component/Timeline/TextDelegate.qml +++ b/imports/NeoChat/Component/Timeline/TextDelegate.qml @@ -51,6 +51,11 @@ a{ Layout.fillWidth: true onLinkActivated: RoomManager.openResource(link) + onHoveredLinkChanged: if (hoveredLink.length > 0) { + applicationWindow().hoverLinkIndicator.text = hoveredLink; + } else { + applicationWindow().hoverLinkIndicator.text = ""; + } MouseArea { anchors.fill: parent diff --git a/qml/main.qml b/qml/main.qml index a139007d8..9803dd71c 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -369,4 +369,21 @@ Kirigami.ApplicationWindow { } } } + + property Item hoverLinkIndicator: QQC2.Control { + parent: overlay.parent + property alias text: linkText.text + opacity: text.length > 0 ? 1 : 0 + + z: 20 + x: 0 + y: parent.height - implicitHeight + contentItem: QQC2.Label { + id: linkText + } + Kirigami.Theme.colorSet: Kirigami.Theme.View + background: Rectangle { + color: Kirigami.Theme.backgroundColor + } + } }