Make message selectable.

No need for manually "Copying".
This commit is contained in:
Black Hat
2018-09-17 08:13:45 +08:00
parent c309f7f3ee
commit d02c3f6e90
6 changed files with 14 additions and 117 deletions

View File

@@ -4,7 +4,6 @@ import Qt.labs.settings 1.0
Settings {
property bool lazyLoad: true
property bool richText: true
property bool pressAndHold
property bool rearrangeByActivity

View File

@@ -198,13 +198,6 @@ Page {
onCheckedChanged: MSettings.lazyLoad = checked
}
Switch {
text: "Use RichText instead of StyledText"
checked: MSettings.richText
onCheckedChanged: MSettings.richText = checked
}
Switch {
text: "Use press and hold instead of right click"
checked: MSettings.pressAndHold

View File

@@ -69,12 +69,23 @@ RowLayout {
}
}
AutoLabel {
TextEdit {
Layout.fillWidth: true
text: display
text: (highlighted ? "<style>a{color: white;}</style>" : "") + display
visible: isText
coloredBackground: highlighted
color: highlighted ? "white": Material.foreground
font.family: "Noto Sans"
font.pointSize: 10
selectByMouse: true
readOnly: true
wrapMode: Label.Wrap
selectionColor: Material.accent
textFormat: Text.RichText
onLinkActivated: Qt.openUrlExternally(link)
}
Loader {

View File

@@ -9,11 +9,6 @@ Menu {
id: messageContextMenu
MenuItem {
text: "Copy"
onTriggered: matriqueController.copyToClipboard(model.plainText)
}
MenuItem {
text: "View Source"