| 1 |
// SPDX-FileCopyrightText: Nheko Contributors |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: GPL-3.0-or-later |
| 4 |
|
| 5 |
import QtQuick |
| 6 |
import QtQuick.Controls |
| 7 |
import im.nheko |
| 8 |
|
| 9 |
Dialog { |
| 10 |
default property alias inner: scroll.data |
| 11 |
property int useableWidth: scroll.width - scroll.ScrollBar.vertical.width |
| 12 |
|
| 13 |
parent: Overlay.overlay |
| 14 |
anchors.centerIn: parent |
| 15 |
height: (Math.floor(parent.height / 2) - Nheko.paddingLarge) * 2 |
| 16 |
width: (Math.floor(parent.width / 2) - Nheko.paddingLarge) * 2 |
| 17 |
padding: 0 |
| 18 |
modal: true |
| 19 |
standardButtons: Dialog.Ok | Dialog.Cancel |
| 20 |
closePolicy: Popup.NoAutoClose |
| 21 |
contentChildren: [ |
| 22 |
ScrollView { |
| 23 |
id: scroll |
| 24 |
|
| 25 |
clip: true |
| 26 |
anchors.fill: parent |
| 27 |
ScrollBar.horizontal.visible: false |
| 28 |
ScrollBar.vertical.visible: true |
| 29 |
} |
| 30 |
] |
| 31 |
|
| 32 |
background: Rectangle { |
| 33 |
color: palette.window |
| 34 |
border.color: Nheko.theme.separator |
| 35 |
border.width: 1 |
| 36 |
radius: Nheko.paddingSmall |
| 37 |
} |
| 38 |
|
| 39 |
} |