Add syntaxhighlighting to the MessageSourceSheet

This commit is contained in:
Tobias Fella
2021-08-20 23:23:16 +02:00
parent 132c9c50fa
commit 0a39fccec8
3 changed files with 13 additions and 3 deletions

View File

@@ -5,6 +5,7 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import org.kde.syntaxhighlighting 1.0
import org.kde.kirigami 2.15 as Kirigami
Kirigami.OverlaySheet {
@@ -16,9 +17,16 @@ Kirigami.OverlaySheet {
}
TextArea {
id: sourceTextArea
text: sourceText
readOnly: true
wrapMode: Text.WordWrap
SyntaxHighlighter {
textEdit: sourceTextArea
repository: Repository
definition: "JSON"
}
}
}