summary refs log tree commit diff
path: root/resources/qml/RawMessageDialog.qml
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2021-08-01 10:51:21 +0000
committerGitHub <noreply@github.com>2021-08-01 10:51:21 +0000
commit619525e62f55ca683b4a8be7a8868bc42d7edc4e (patch)
treed6f9ca51c9ad043ff58a6dac3cebd14aeecaaf8e /resources/qml/RawMessageDialog.qml
parentAdd option to only send encrypted messages to verified devices (diff)
parentFix colors for manual dark theme (diff)
downloadnheko-619525e62f55ca683b4a8be7a8868bc42d7edc4e.tar.xz
Merge pull request #662 from LorenDB/qml-all-the-things
QML all the things, part 3: Raw message dialog
Diffstat (limited to 'resources/qml/RawMessageDialog.qml')
-rw-r--r--resources/qml/RawMessageDialog.qml51
1 files changed, 51 insertions, 0 deletions
diff --git a/resources/qml/RawMessageDialog.qml b/resources/qml/RawMessageDialog.qml
new file mode 100644

index 00000000..231e2f6d --- /dev/null +++ b/resources/qml/RawMessageDialog.qml
@@ -0,0 +1,51 @@ +// SPDX-FileCopyrightText: 2021 Nheko Contributors +// +// SPDX-License-Identifier: GPL-3.0-or-later + +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import im.nheko 1.0 + +ApplicationWindow { + id: rawMessageRoot + + property alias rawMessage: rawMessageView.text + + x: MainWindow.x + (MainWindow.width / 2) - (width / 2) + y: MainWindow.y + (MainWindow.height / 2) - (height / 2) + height: 420 + width: 420 + palette: Nheko.colors + color: Nheko.colors.window + flags: Qt.Tool | Qt.WindowStaysOnTopHint + + Shortcut { + sequence: StandardKey.Cancel + onActivated: rawMessageRoot.close() + } + + ScrollView { + anchors.margins: Nheko.paddingMedium + anchors.fill: parent + palette: Nheko.colors + padding: Nheko.paddingMedium + + TextArea { + id: rawMessageView + + font: Nheko.monospaceFont() + color: Nheko.colors.text + readOnly: true + + background: Rectangle { + color: Nheko.colors.base + } + } + + } + + footer: DialogButtonBox { + standardButtons: DialogButtonBox.Ok + onAccepted: rawMessageRoot.close() + } +}