diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-02-21 13:35:11 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-02-23 15:43:23 +0100 |
commit | 7fbd3cbdadb5bfb509b9bc396d949fe38a067072 (patch) | |
tree | 7d11120d4eb69aaa42039181d3b35a71b8ec0c9e /components/mailviewer/qml/TextContent.qml | |
parent | 46486a878310df55b686b8fbc2b6aaf35d613da7 (diff) | |
download | kube-7fbd3cbdadb5bfb509b9bc396d949fe38a067072.tar.gz kube-7fbd3cbdadb5bfb509b9bc396d949fe38a067072.zip |
Search in conversationview
...via syntax highligher or search api.
Diffstat (limited to 'components/mailviewer/qml/TextContent.qml')
-rw-r--r-- | components/mailviewer/qml/TextContent.qml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/components/mailviewer/qml/TextContent.qml b/components/mailviewer/qml/TextContent.qml index 316786ef..95e196b4 100644 --- a/components/mailviewer/qml/TextContent.qml +++ b/components/mailviewer/qml/TextContent.qml | |||
@@ -27,8 +27,14 @@ Item { | |||
27 | property bool embedded: true | 27 | property bool embedded: true |
28 | property string type | 28 | property string type |
29 | 29 | ||
30 | property string searchString | ||
30 | property int contentHeight: textEdit.height | 31 | property int contentHeight: textEdit.height |
31 | 32 | ||
33 | onSearchStringChanged: { | ||
34 | //This is a workaround because otherwise the view will not take the ViewHighlighter changes into account. | ||
35 | textEdit.text = root.content | ||
36 | } | ||
37 | |||
32 | TextEdit { | 38 | TextEdit { |
33 | id: textEdit | 39 | id: textEdit |
34 | 40 | ||
@@ -56,5 +62,9 @@ Item { | |||
56 | acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text | 62 | acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text |
57 | cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor | 63 | cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor |
58 | } | 64 | } |
65 | Kube.ViewHighlighter { | ||
66 | textDocument: textEdit.textDocument | ||
67 | searchString: root.searchString | ||
68 | } | ||
59 | } | 69 | } |
60 | } | 70 | } |