Changeset View
Changeset View
Standalone View
Standalone View
src/contents/ui/event-types/TextTemplate.qml
| Show All 24 Lines | RowLayout { | ||||
| Layout.fillWidth: true | Layout.fillWidth: true | ||||
| property var label: Kazv.SelectableText { | property var label: Kazv.SelectableText { | ||||
| objectName: 'textEventContent' | objectName: 'textEventContent' | ||||
| id: label | id: label | ||||
| Layout.fillWidth: true | Layout.fillWidth: true | ||||
| wrapMode: Text.Wrap | wrapMode: Text.Wrap | ||||
| text: upper.text | text: upper.text | ||||
| onLinkActivated: (link) => { | |||||
| Qt.openUrlExternally(link); | |||||
| } | |||||
| onHoveredLinkChanged: (link) => { | |||||
| if (link) { | |||||
| // first give it text, then make it visible | |||||
| label.ToolTip.text = link; | |||||
| label.ToolTip.visible = true; | |||||
| } else { | |||||
| // first make it invisible, then remove the text | |||||
| label.ToolTip.visible = false; | |||||
| label.ToolTip.text = ''; | |||||
| } | |||||
| } | |||||
| ToolTip.delay: Kirigami.Units.shortDuration | |||||
| } | } | ||||
| data: [ | data: [ | ||||
| ...(Array.isArray(upper.children) ? upper.children : | ...(Array.isArray(upper.children) ? upper.children : | ||||
| upper.children ? [upper.children] : []), | upper.children ? [upper.children] : []), | ||||
| label | label | ||||
| ] | ] | ||||
| } | } | ||||
| Show All 29 Lines | |||||