matrixion/qml/dialogs/RawMessageDialog.qml

50 lines
1.2 KiB
QML
Raw Permalink Normal View History

2021-07-31 05:13:58 +03:00
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
2021-07-31 05:13:58 +03:00
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick 2.15
import QtQuick.Controls 2.15
import im.nheko
2021-07-31 05:13:58 +03:00
ApplicationWindow {
id: rawMessageRoot
property alias rawMessage: rawMessageView.text
2022-04-11 05:18:16 +03:00
color: timelineRoot.palette.window
2021-08-19 17:55:54 +03:00
flags: Qt.Tool | Qt.WindowStaysOnTopHint | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
2022-04-16 03:13:01 +03:00
height: 420
palette: timelineRoot.palette
width: 420
footer: DialogButtonBox {
standardButtons: DialogButtonBox.Ok
onAccepted: rawMessageRoot.close()
}
2021-07-31 05:13:58 +03:00
Shortcut {
sequence: StandardKey.Cancel
2022-04-16 03:13:01 +03:00
2021-07-31 05:13:58 +03:00
onActivated: rawMessageRoot.close()
}
ScrollView {
anchors.fill: parent
2022-04-16 03:13:01 +03:00
anchors.margins: Nheko.paddingMedium
2021-07-31 05:13:58 +03:00
padding: Nheko.paddingMedium
2022-04-16 03:13:01 +03:00
palette: timelineRoot.palette
2021-07-31 05:13:58 +03:00
TextArea {
id: rawMessageView
2022-04-16 03:13:01 +03:00
anchors.fill: parent
2022-04-11 05:18:16 +03:00
color: timelineRoot.palette.text
2022-04-16 03:13:01 +03:00
font: Nheko.monospaceFont()
2021-07-31 05:13:58 +03:00
readOnly: true
textFormat: Text.PlainText
2021-07-31 20:55:56 +03:00
background: Rectangle {
2022-04-11 05:18:16 +03:00
color: timelineRoot.palette.base
2021-07-31 20:55:56 +03:00
}
2021-07-31 05:13:58 +03:00
}
}
}