Debian Codegraph @

resources/qml/dialogs/RawMessageDialog.qml

raw
1 // SPDX-FileCopyrightText: Nheko Contributors
2 //
3 // SPDX-License-Identifier: GPL-3.0-or-later
4
5 import QtQuick
6 import QtQuick.Controls
7 import im.nheko
8
9 ApplicationWindow {
10 id: rawMessageRoot
11
12 property alias rawMessage: rawMessageView.text
13
14 height: 420
15 width: 420
16 color: palette.window
17 flags: Qt.Tool | Qt.WindowStaysOnTopHint | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
18
19 Shortcut {
20 sequence: StandardKey.Cancel
21 onActivated: rawMessageRoot.close()
22 }
23
24 ScrollView {
25 anchors.margins: Nheko.paddingMedium
26 anchors.fill: parent
27 padding: Nheko.paddingMedium
28
29 TextArea {
30 id: rawMessageView
31
32 font: Nheko.monospaceFont()
33 color: palette.text
34 readOnly: true
35 textFormat: Text.PlainText
36
37 anchors.fill: parent
38
39 background: Rectangle {
40 color: palette.base
41 }
42
43 }
44
45 }
46
47 footer: DialogButtonBox {
48 standardButtons: DialogButtonBox.Ok
49 onAccepted: rawMessageRoot.close()
50 }
51
52 }