matrixion/qml/components/MainWindowDialog.qml

39 lines
1.1 KiB
QML
Raw Normal View History

2021-10-17 18:17:29 +03:00
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
2021-10-17 18:17:29 +03:00
// SPDX-License-Identifier: GPL-3.0-or-later
import Qt.labs.platform 1.1 as P
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.3
import im.nheko
2021-10-17 18:17:29 +03:00
Dialog {
default property alias inner: scroll.data
property int useableWidth: scroll.width - scroll.ScrollBar.vertical.width
2021-10-17 18:17:29 +03:00
anchors.centerIn: parent
2022-04-16 03:13:01 +03:00
closePolicy: Popup.NoAutoClose
2021-10-17 18:17:29 +03:00
height: (Math.floor(parent.height / 2) - Nheko.paddingLarge) * 2
modal: true
2022-04-16 03:13:01 +03:00
padding: 0
parent: Overlay.overlay
2021-10-17 18:17:29 +03:00
standardButtons: Dialog.Ok | Dialog.Cancel
2022-04-16 03:13:01 +03:00
width: (Math.floor(parent.width / 2) - Nheko.paddingLarge) * 2
background: Rectangle {
border.color: Nheko.theme.separator
border.width: 1
color: timelineRoot.palette.window
radius: Nheko.paddingSmall
}
2021-10-17 18:17:29 +03:00
contentChildren: [
ScrollView {
id: scroll
ScrollBar.horizontal.visible: false
ScrollBar.vertical.visible: true
2022-04-16 03:13:01 +03:00
anchors.fill: parent
clip: true
2021-10-17 18:17:29 +03:00
}
]
}