fix(@desktop/wallet): opening add account popup causes the app to crash

Fixes: #9412
This commit is contained in:
Sale Djenic 2023-02-03 11:28:54 +01:00 committed by Anthony Laibe
parent 025729421f
commit 3f52df4f87
1 changed files with 6 additions and 3 deletions

View File

@ -147,20 +147,23 @@ ColumnLayout {
} }
RowLayout { RowLayout {
Layout.fillWidth: true Layout.preferredWidth: parent.width
Layout.rightMargin: 2 Layout.rightMargin: 2
spacing: Style.current.bigPadding spacing: Style.current.bigPadding
visible: advancedSection.addAccountType !== Constants.AddAccountType.ImportPrivateKey && visible: advancedSection.addAccountType !== Constants.AddAccountType.ImportPrivateKey &&
advancedSection.addAccountType !== Constants.AddAccountType.WatchOnly advancedSection.addAccountType !== Constants.AddAccountType.WatchOnly
readonly property int itemWidth: (advancedSection.width - Style.current.bigPadding) * 0.5
DerivationPathsPanel { DerivationPathsPanel {
id: derivationPathsPanel id: derivationPathsPanel
Layout.preferredWidth: ((parent.width - (Style.current.bigPadding/2))/2) Layout.preferredWidth: parent.itemWidth
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
Component.onCompleted: advancedSection.path = Qt.binding(function() { return derivationPathsPanel.path}) Component.onCompleted: advancedSection.path = Qt.binding(function() { return derivationPathsPanel.path})
} }
DerivedAddressesPanel { DerivedAddressesPanel {
id: derivedAddressesPanel id: derivedAddressesPanel
Layout.preferredWidth: ((parent.width - (Style.current.bigPadding/2))/2) Layout.preferredWidth: parent.itemWidth
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
selectedAccountType: advancedSection.addAccountType selectedAccountType: advancedSection.addAccountType