mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-12-01 22:58:49 +03:00
87e81498b7
We explicitly set a parent. We can't assign to ApplicationWindow.transientParent though, only to Window.transientParent, so we just call setTransientParent in C++.
52 lines
1.1 KiB
QML
52 lines
1.1 KiB
QML
// 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
|
|
|
|
height: 420
|
|
width: 420
|
|
palette: Nheko.colors
|
|
color: Nheko.colors.window
|
|
flags: Qt.Tool | Qt.WindowStaysOnTopHint | Qt.WindowCloseButtonHint
|
|
Component.onCompleted: Nheko.reparent(rawMessageRoot)
|
|
|
|
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()
|
|
}
|
|
|
|
}
|