forked from Silverfish/proton-bridge
GODT-1456: Make text selectable and clickable
This commit is contained in:
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user