fix(@desktop): StatusScrollView fixes for wallet

This commit is contained in:
MishkaRogachev 2022-07-20 14:15:05 +03:00 committed by Mikhail Rogachev
parent 58e0fce819
commit 667db7038a
4 changed files with 111 additions and 120 deletions

View File

@ -14,6 +14,7 @@ Rectangle {
id: walletFooter id: walletFooter
property var sendModal property var sendModal
property var walletStore
height: 61 height: 61
color: Theme.palette.statusAppLayout.rightPanelBackgroundColor color: Theme.palette.statusAppLayout.rightPanelBackgroundColor
@ -57,7 +58,7 @@ Rectangle {
Component { Component {
id: receiveModalComponent id: receiveModalComponent
ReceiveModal { ReceiveModal {
selectedAccount: walletHeader.walletStore.currentAccount selectedAccount: walletStore.currentAccount
anchors.centerIn: parent anchors.centerIn: parent
} }
} }

View File

@ -48,7 +48,7 @@ Popup {
Column { Column {
id: content id: content
width: popup.width width: scrollView.availableWidth
spacing: Style.current.padding spacing: Style.current.padding
Repeater { Repeater {

View File

@ -78,6 +78,7 @@ Item {
Layout.leftMargin: -root.StackView.view.anchors.leftMargin Layout.leftMargin: -root.StackView.view.anchors.leftMargin
Layout.rightMargin: -root.StackView.view.anchors.rightMargin Layout.rightMargin: -root.StackView.view.anchors.rightMargin
sendModal: root.sendModal sendModal: root.sendModal
walletStore: RootStore
} }
} }
} }

View File

@ -266,24 +266,16 @@ StatusModal {
width: parent.width width: parent.width
anchors.top: border.bottom anchors.top: border.bottom
anchors.topMargin: Style.current.halfPadding anchors.topMargin: Style.current.halfPadding
anchors.left: parent.left
contentHeight: recipientSelector.height + addressSelector.height + networkSelector.height +
fees.height + Style.current.halfPadding
ScrollBar.vertical.policy: ScrollBar.AlwaysOff
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ColumnLayout {
width: scrollView.availableWidth
spacing: Style.current.halfPadding
// To-do use standard StatusInput component once the flow for ens name resolution is clear // To-do use standard StatusInput component once the flow for ens name resolution is clear
RecipientSelector { RecipientSelector {
anchors.top: parent.top
anchors.topMargin: Style.current.halfPadding
anchors.right: parent.right
anchors.left: parent.left
id: recipientSelector id: recipientSelector
accounts: popup.store.accounts accounts: popup.store.accounts
contactsStore: popup.contactsStore contactsStore: popup.contactsStore
label: qsTr("To") label: qsTr("To")
Layout.fillWidth: true
input.placeholderText: qsTr("Enter an ENS name or address") input.placeholderText: qsTr("Enter an ENS name or address")
input.anchors.leftMargin: 0 input.anchors.leftMargin: 0
input.anchors.rightMargin: 0 input.anchors.rightMargin: 0
@ -293,26 +285,22 @@ StatusModal {
isSelectorVisible: false isSelectorVisible: false
addContactEnabled: false addContactEnabled: false
onSelectedRecipientChanged: gasSelector.estimateGas() onSelectedRecipientChanged: gasSelector.estimateGas()
Layout.fillWidth: true
} }
TabAddressSelectorView { TabAddressSelectorView {
id: addressSelector id: addressSelector
anchors.top: recipientSelector.bottom
anchors.right: parent.right
anchors.left: parent.left
store: popup.store store: popup.store
onContactSelected: { onContactSelected: {
recipientSelector.input.text = address recipientSelector.input.text = address
} }
Layout.fillWidth: true
} }
NetworkSelector { NetworkSelector {
id: networkSelector id: networkSelector
store: popup.store store: popup.store
selectedAccount: popup.selectedAccount selectedAccount: popup.selectedAccount
anchors.top: addressSelector.bottom
anchors.right: parent.right
anchors.left: parent.left
amountToSend: isNaN(parseFloat(amountToSendInput.text)) ? 0 : parseFloat(amountToSendInput.text) amountToSend: isNaN(parseFloat(amountToSendInput.text)) ? 0 : parseFloat(amountToSendInput.text)
requiredGasInEth: gasSelector.selectedGasEthValue requiredGasInEth: gasSelector.selectedGasEthValue
assets: popup.selectedAccount.assets assets: popup.selectedAccount.assets
@ -322,15 +310,15 @@ StatusModal {
gasSelector.updateGasEthValue() gasSelector.updateGasEthValue()
} }
onReCalculateSuggestedRoute: popup.recalculateRoutesAndFees(disabledChainIds) onReCalculateSuggestedRoute: popup.recalculateRoutesAndFees(disabledChainIds)
Layout.fillWidth: true
} }
Rectangle { Rectangle {
id: fees id: fees
radius: 13 radius: 13
color: Theme.palette.indirectColor1 color: Theme.palette.indirectColor1
anchors.top: networkSelector.bottom implicitHeight: gasSelector.visible || gasValidator.visible ? feesLayout.height + gasValidator.height : 0
width: parent.width Layout.fillWidth: true
height: gasSelector.visible || gasValidator.visible ? feesLayout.height + gasValidator.height : 0
RowLayout { RowLayout {
id: feesLayout id: feesLayout
@ -400,6 +388,7 @@ StatusModal {
} }
} }
} }
}
TransactionFormGroup { TransactionFormGroup {
id: group4 id: group4