Files
purple-electrumwallet/electrum/gui/qml/components/controls/HelpDialog.qml
T

76 lines
1.9 KiB
QML
Raw Normal View History

import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Controls.Material
ElDialog {
id: dialog
header: Item { }
2025-12-17 16:50:59 +01:00
footer: Item { }
property string text
property string heading
z: 1 // raise z so it also covers dialogs using overlay as parent
anchors.centerIn: parent
padding: 0
needsSystemBarPadding: false
2025-12-17 16:50:59 +01:00
width: parent.width * 4/5
Overlay.modal: Rectangle {
2025-12-17 16:50:59 +01:00
color: "#aa000000"
}
background: Rectangle {
color: "transparent"
}
Pane {
id: rootPane
2025-12-17 16:50:59 +01:00
width: parent.width
implicitHeight: rootLayout.height + topPadding + bottomPadding
padding: constants.paddingLarge
2025-12-17 16:50:59 +01:00
background: Rectangle {
2026-02-20 13:36:08 +01:00
color: constants.highlightBackground
2025-12-17 16:50:59 +01:00
}
ColumnLayout {
id: rootLayout
2025-12-17 16:50:59 +01:00
width: parent.width
2024-09-17 13:21:46 +02:00
spacing: constants.paddingLarge
RowLayout {
2024-09-17 13:21:46 +02:00
Layout.fillWidth: true
Image {
source: Qt.resolvedUrl('../../../icons/info.png')
Layout.preferredWidth: constants.iconSizeSmall
Layout.preferredHeight: constants.iconSizeSmall
}
Label {
text: dialog.heading
2024-09-17 13:21:46 +02:00
font.pixelSize: constants.fontSizeMedium
font.underline: true
font.italic: true
}
}
2024-09-17 13:21:46 +02:00
Label {
id: message
Layout.fillWidth: true
text: dialog.text
2024-09-17 13:21:46 +02:00
font.pixelSize: constants.fontSizeSmall
wrapMode: TextInput.WordWrap
textFormat: TextEdit.RichText
background: Rectangle {
color: 'transparent'
}
}
2025-12-17 16:50:59 +01:00
Item {
height: constants.paddingLarge
}
}
}
}