GODT-1456: Make text selectable and clickable

This commit is contained in:
Jakub
2021-12-07 12:00:47 +01:00
committed by Jakub Cuth
parent 7276c23b2b
commit b74dba884f

View File

@ -126,17 +126,31 @@ SettingsView {
}
}
Label {
TextEdit {
text: {
var address = "bridge@protonmail.com"
var mailTo = `<a href="mailto://${address}">${address}</a>`
return qsTr("These reports are not end-to-end encrypted. In case of sensitive information, contact us at %1.").arg(mailTo)
return "<style>a:link { color: " + root.colorScheme.interaction_norm + "; }</style>" +qsTr(
"These reports are not end-to-end encrypted. In case of sensitive information, contact us at %1."
).arg(mailTo)
}
colorScheme: root.colorScheme
onLinkActivated: Qt.openUrlExternally(link)
textFormat: Text.RichText
readOnly: true
Layout.fillWidth: true
wrapMode: Text.WordWrap
type: Label.Caption
color: root.colorScheme.text_weak
font.family: ProtonStyle.font_family
font.weight: ProtonStyle.fontWeight_400
font.pixelSize: ProtonStyle.caption_font_size
font.letterSpacing: ProtonStyle.caption_letter_spacing
// No way to set lineHeight: Style.caption_line_height
selectionColor: root.colorScheme.interaction_norm
selectedTextColor: root.colorScheme.text_invert
wrapMode: Text.WordWrap
selectByMouse: true
}
Button {