Warning, /network/neochat/src/qml/MessageSourceSheet.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2019 Black Hat <bhat@encom.eu.org> 0002 // SPDX-FileCopyrightText: 2020 Tobias Fella <tobias.fella@kde.org> 0003 // SPDX-License-Identifier: GPL-3.0-only 0004 0005 import QtQuick 0006 import QtQuick.Controls as QQC2 0007 0008 import org.kde.kirigami as Kirigami 0009 import org.kde.syntaxhighlighting 0010 0011 import org.kde.neochat 0012 0013 Kirigami.Page { 0014 property string sourceText 0015 0016 topPadding: 0 0017 leftPadding: 0 0018 rightPadding: 0 0019 bottomPadding: 0 0020 0021 title: i18n("Event Source") 0022 0023 QQC2.ScrollView { 0024 anchors.fill: parent 0025 contentWidth: availableWidth 0026 0027 // HACK: Hide unnecessary horizontal scrollbar (https://bugreports.qt.io/browse/QTBUG-83890) 0028 QQC2.ScrollBar.horizontal.policy: QQC2.ScrollBar.AlwaysOff 0029 0030 QQC2.TextArea { 0031 id: sourceTextArea 0032 text: sourceText 0033 readOnly: true 0034 textFormat: TextEdit.PlainText 0035 wrapMode: TextEdit.Wrap 0036 background: Rectangle { 0037 Kirigami.Theme.colorSet: Kirigami.Theme.View 0038 Kirigami.Theme.inherit: false 0039 color: Kirigami.Theme.backgroundColor 0040 } 0041 0042 // opt-out of whatever spell checker a styled TextArea might come with 0043 Kirigami.SpellCheck.enabled: false 0044 0045 SyntaxHighlighter { 0046 textEdit: sourceTextArea 0047 definition: "JSON" 0048 repository: Repository 0049 } 0050 } 0051 } 0052 } 0053