qml: use standard Button for buttons outside of buttoncontainer

This commit is contained in:
Sander van Grieken
2026-02-23 13:03:47 +01:00
parent 3a740256c5
commit 87bb63e442
3 changed files with 45 additions and 66 deletions
+8 -16
View File
@@ -145,14 +145,10 @@ Pane {
Layout.fillWidth: true
Layout.preferredHeight: 1
}
Pane {
background: Rectangle { color: Material.dialogColor }
padding: 0
FlatButton {
Layout.minimumWidth: implicitWidth
text: channeldetails.frozenForSending ? qsTr('Unfreeze') : qsTr('Freeze')
onClicked: channeldetails.freezeForSending()
}
Button {
Layout.minimumWidth: implicitWidth
text: channeldetails.frozenForSending ? qsTr('Unfreeze') : qsTr('Freeze')
onClicked: channeldetails.freezeForSending()
}
}
@@ -182,14 +178,10 @@ Pane {
Layout.fillWidth: true
Layout.preferredHeight: 1
}
Pane {
background: Rectangle { color: Material.dialogColor }
padding: 0
FlatButton {
Layout.minimumWidth: implicitWidth
text: channeldetails.frozenForReceiving ? qsTr('Unfreeze') : qsTr('Freeze')
onClicked: channeldetails.freezeForReceiving()
}
Button {
Layout.minimumWidth: implicitWidth
text: channeldetails.frozenForReceiving ? qsTr('Unfreeze') : qsTr('Freeze')
onClicked: channeldetails.freezeForReceiving()
}
}
+18 -23
View File
@@ -253,31 +253,26 @@ ElDialog {
}
Pane {
Button {
Layout.alignment: Qt.AlignHCenter
visible: _swaphelper.isNostr()
background: Rectangle { color: constants.darkerDialogBackground }
padding: 0
FlatButton {
text: qsTr('Choose swap provider')
enabled: _swaphelper.state != SwapHelper.Initializing
&& _swaphelper.state != SwapHelper.Started
&& _swaphelper.state != SwapHelper.Success
&& _swaphelper.availableSwapServers.count
onClicked: {
var dialog = app.nostrSwapServersDialog.createObject(app, {
swaphelper: _swaphelper,
selectedPubkey: Config.swapServerNPub
})
dialog.accepted.connect(function() {
if (Config.swapServerNPub != dialog.selectedPubkey) {
Config.swapServerNPub = dialog.selectedPubkey
_swaphelper.setReadyState()
}
})
dialog.open()
}
text: qsTr('Choose swap provider')
enabled: _swaphelper.state != SwapHelper.Initializing
&& _swaphelper.state != SwapHelper.Started
&& _swaphelper.state != SwapHelper.Success
&& _swaphelper.availableSwapServers.count
onClicked: {
var dialog = app.nostrSwapServersDialog.createObject(app, {
swaphelper: _swaphelper,
selectedPubkey: Config.swapServerNPub
})
dialog.accepted.connect(function() {
if (Config.swapServerNPub != dialog.selectedPubkey) {
Config.swapServerNPub = dialog.selectedPubkey
_swaphelper.setReadyState()
}
})
dialog.open()
}
}
@@ -186,39 +186,31 @@ WizardComponent {
iconStyle: InfoTextArea.IconStyle.Error
}
Pane {
Button {
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: constants.paddingLarge
padding: 0
visible: !isMultisig
background: Rectangle {
color: Qt.lighter(Material.dialogColor, 1.5)
}
FlatButton {
text: qsTr('Detect Existing Accounts')
onClicked: {
var dialog = bip39recoveryDialog.createObject(mainLayout, {
walletType: wizard_data['wallet_type'],
seed: wizard_data['seed'],
seedExtraWords: wizard_data['seed_extra_words']
})
dialog.accepted.connect(function () {
// select matching script type button and set derivation path
for (var i = 0; i < scripttypegroup.buttons.length; i++) {
var btn = scripttypegroup.buttons[i]
if (btn.visible && btn.scripttype == dialog.scriptType) {
btn.checked = true
derivationpathtext.text = dialog.derivationPath
return
}
text: qsTr('Detect Existing Accounts')
onClicked: {
var dialog = bip39recoveryDialog.createObject(mainLayout, {
walletType: wizard_data['wallet_type'],
seed: wizard_data['seed'],
seedExtraWords: wizard_data['seed_extra_words']
})
dialog.accepted.connect(function () {
// select matching script type button and set derivation path
for (var i = 0; i < scripttypegroup.buttons.length; i++) {
var btn = scripttypegroup.buttons[i]
if (btn.visible && btn.scripttype == dialog.scriptType) {
btn.checked = true
derivationpathtext.text = dialog.derivationPath
return
}
})
dialog.open()
}
}
})
dialog.open()
}
}
}
}