Show link on hover

Fix #279
This commit is contained in:
Carl Schwan
2021-05-07 04:18:50 +02:00
parent 17b6f4e78a
commit 173d8075ad
2 changed files with 22 additions and 0 deletions

View File

@@ -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

View File

@@ -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
}
}
}