app/resources/qml/Components/DisclaimerDialog.qml

53 lines
1 KiB
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Controls.Material 2.15
Dialog {
id: control
title: ""
property string content: ""
parent: Overlay.overlay
x: (parent.width - width) * 0.5
y: (parent.height - height) * 0.5
width: parent.width * 0.8
height: implicitHeight
modal: true
standardButtons: Dialog.Close
header: Label {
text: control.title
visible: control.title
elide: Label.ElideRight
padding: 24
bottomPadding: 0
font.bold: true
font.pixelSize: 16
background: Rectangle {
radius: 2
color: control.Material.dialogColor
clip: true
}
onLinkActivated: {
Qt.openUrlExternally(link)
}
}
contentItem: Label {
wrapMode: Text.Wrap
width: control.width * 0.8
height: implicitHeight
text: control.content
onLinkActivated: {
Qt.openUrlExternally(link)
}
}
}