1
0

qml: ElDialog now defaults to parent on Overlay.overlay

This was replicated in basically all ElDialog derived dialogs
This commit is contained in:
Sander van Grieken
2023-03-20 16:52:21 +01:00
parent b8d4ccd432
commit 677e1259df
30 changed files with 8 additions and 174 deletions

View File

@@ -16,12 +16,6 @@ ElDialog {
allowClose: false
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
property alias state: s.state
property alias error: errorText.text
property alias info: infoText.text

View File

@@ -18,11 +18,6 @@ ElDialog {
title: qsTr('Close Channel')
iconSource: Qt.resolvedUrl('../../icons/lightning_disconnected.png')
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
property bool _closing: false
closePolicy: Popup.NoAutoClose

View File

@@ -30,12 +30,6 @@ ElDialog {
height: parent.height
padding: 0
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
function updateAmountText() {
btcValue.text = Config.formatSats(finalizer.effectiveAmount, false)
fiatValue.text = Daemon.fx.enabled

View File

@@ -22,12 +22,6 @@ ElDialog {
height: parent.height
padding: 0
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
ColumnLayout {
anchors.fill: parent
spacing: 0

View File

@@ -15,12 +15,6 @@ ElDialog
property bool _sending: false
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
width: parent.width
height: parent.height
@@ -113,11 +107,6 @@ ElDialog
property string reportText
z: 3000
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
width: parent.width
height: parent.height

View File

@@ -17,16 +17,9 @@ ElDialog {
title: qsTr('Share Transaction')
parent: Overlay.overlay
modal: true
width: parent.width
height: parent.height
Overlay.modal: Rectangle {
color: "#aa000000"
}
padding: 0
ColumnLayout {

View File

@@ -15,16 +15,9 @@ ElDialog {
title: ''
parent: Overlay.overlay
modal: true
width: parent.width
height: parent.height
Overlay.modal: Rectangle {
color: "#aa000000"
}
padding: 0
ColumnLayout {

View File

@@ -15,12 +15,6 @@ ElDialog {
property bool valid: false
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
width: parent.width
height: parent.height

View File

@@ -11,11 +11,6 @@ ElDialog {
property bool valid: false
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
width: parent.width
height: parent.height

View File

@@ -21,12 +21,6 @@ ElDialog {
padding: 0
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
property bool _canMax: invoice.invoiceType == Invoice.OnchainInvoice
ColumnLayout {

View File

@@ -17,12 +17,6 @@ ElDialog {
title: qsTr('Paying Lightning Invoice...')
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
Item {
id: s
state: ''

View File

@@ -15,12 +15,6 @@ ElDialog {
property InvoiceParser invoiceParser
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
padding: 0
property bool valid: comment.text.length <= invoiceParser.lnurlData['comment_allowed']

View File

@@ -13,11 +13,7 @@ ElDialog {
title: qsTr('Loading Wallet')
iconSource: Qt.resolvedUrl('../../icons/wallet.png')
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
x: Math.floor((parent.width - implicitWidth) / 2)
y: Math.floor((parent.height - implicitHeight) / 2)

View File

@@ -18,16 +18,10 @@ ElDialog {
signal yesClicked
parent: Overlay.overlay
modal: true
z: 1 // raise z so it also covers dialogs using overlay as parent
anchors.centerIn: parent
Overlay.modal: Rectangle {
color: "#aa000000"
}
padding: 0
ColumnLayout {
@@ -36,7 +30,7 @@ ElDialog {
Layout.alignment: Qt.AlignHCenter
TextArea {
id: message
Layout.preferredWidth: Overlay.overlay.width *2/3
Layout.preferredWidth: dialog.parent.width * 2/3
readOnly: true
wrapMode: TextInput.WordWrap
textFormat: richText ? TextEdit.RichText : TextEdit.PlainText

View File

@@ -13,17 +13,11 @@ ElDialog {
title: qsTr("Open Lightning Channel")
iconSource: Qt.resolvedUrl('../../icons/lightning.png')
parent: Overlay.overlay
modal: true
padding: 0
width: parent.width
height: parent.height
Overlay.modal: Rectangle {
color: "#aa000000"
}
ColumnLayout {
anchors.fill: parent
spacing: 0

View File

@@ -18,12 +18,6 @@ ElDialog {
title: qsTr('Open Wallet')
iconSource: Qt.resolvedUrl('../../icons/wallet.png')
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
focus: true
width: parent.width * 4/5

View File

@@ -18,12 +18,6 @@ ElDialog {
property bool _waiting: false
property string _otpError
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
focus: true
ColumnLayout {

View File

@@ -17,17 +17,10 @@ ElDialog {
property string password
property string infotext
parent: Overlay.overlay
modal: true
anchors.centerIn: parent
width: parent.width * 4/5
padding: 0
Overlay.modal: Rectangle {
color: "#aa000000"
}
ColumnLayout {
id: rootLayout
width: parent.width

View File

@@ -17,8 +17,6 @@ ElDialog {
anchors.centerIn: parent
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: canCancel ? "#aa000000" : "#ff000000"
}

View File

@@ -12,16 +12,9 @@ ElDialog {
title: qsTr('Proxy settings')
parent: Overlay.overlay
modal: true
width: parent.width
height: parent.height
Overlay.modal: Rectangle {
color: "#aa000000"
}
padding: 0
ColumnLayout {

View File

@@ -22,12 +22,6 @@ ElDialog {
height: parent.height
padding: 0
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
ColumnLayout {
anchors.fill: parent
spacing: 0

View File

@@ -21,12 +21,6 @@ ElDialog {
height: parent.height
padding: 0
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
ColumnLayout {
anchors.fill: parent
spacing: 0

View File

@@ -17,13 +17,6 @@ ElDialog {
property alias description: message.text
property alias expiry: expires.currentValue
parent: Overlay.overlay
modal: true
Overlay.modal: Rectangle {
color: "#aa000000"
}
padding: 0
ColumnLayout {

View File

@@ -23,14 +23,8 @@ ElDialog {
property bool _ispaid: false
parent: Overlay.overlay
modal: true
iconSource: Qt.resolvedUrl('../../icons/tab_receive.png')
Overlay.modal: Rectangle {
color: "#aa000000"
}
padding: 0
ColumnLayout {

View File

@@ -15,13 +15,6 @@ ElDialog {
signal txFound(data: string)
signal channelBackupFound(data: string)
parent: Overlay.overlay
modal: true
Overlay.modal: Rectangle {
color: "#aa000000"
}
header: Item {}
padding: 0
topPadding: 0

View File

@@ -12,16 +12,9 @@ ElDialog {
title: qsTr('Server settings')
parent: Overlay.overlay
modal: true
width: parent.width
height: parent.height
Overlay.modal: Rectangle {
color: "#aa000000"
}
padding: 0
ColumnLayout {

View File

@@ -18,12 +18,6 @@ ElDialog {
title: qsTr('Lightning Swap')
iconSource: Qt.resolvedUrl('../../icons/update.png')
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
padding: 0
ColumnLayout {

View File

@@ -20,12 +20,6 @@ ElDialog {
? qsTr('Reverse swap...')
: qsTr('Swap...')
modal: true
parent: Overlay.overlay
Overlay.modal: Rectangle {
color: "#aa000000"
}
Item {
id: s
state: ''

View File

@@ -12,6 +12,12 @@ Dialog {
close()
}
parent: Overlay.overlay
modal: true
Overlay.modal: Rectangle {
color: "#aa000000"
}
closePolicy: allowClose
? Popup.CloseOnEscape | Popup.CloseOnPressOutside
: Popup.NoAutoClose

View File

@@ -6,11 +6,11 @@ import "../controls"
ElDialog {
id: wizard
modal: true
focus: true
width: parent.width
height: parent.height
padding: 0
title: wizardTitle + (pages.currentItem.title ? ' - ' + pages.currentItem.title : '')