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