From 25c79230b6cfad5bb298b79756ebb9ec8f6a14d7 Mon Sep 17 00:00:00 2001 From: Khushboo Mehta Date: Tue, 26 Jul 2022 20:14:55 +0200 Subject: [PATCH] fix(@desktop/wallet): Send Transation modal colors need to be adjusted to match designs fixes #6497 --- ui/StatusQ | 2 +- .../shared/controls/AmountInputWithCursor.qml | 2 +- ui/imports/shared/controls/GasValidator.qml | 1 + ui/imports/shared/popups/SendModal.qml | 15 +++++++++++---- ui/imports/shared/views/SendModalFooter.qml | 2 +- ui/imports/shared/views/SendModalHeader.qml | 3 ++- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ui/StatusQ b/ui/StatusQ index 08c53e2f52..63c008571e 160000 --- a/ui/StatusQ +++ b/ui/StatusQ @@ -1 +1 @@ -Subproject commit 08c53e2f52648f16dfb0558e6f4cd8d2887ef154 +Subproject commit 63c008571eb88a79dcd148b667bac4e1baf96fe0 diff --git a/ui/imports/shared/controls/AmountInputWithCursor.qml b/ui/imports/shared/controls/AmountInputWithCursor.qml index 89ce71e66a..32681234ea 100644 --- a/ui/imports/shared/controls/AmountInputWithCursor.qml +++ b/ui/imports/shared/controls/AmountInputWithCursor.qml @@ -17,7 +17,7 @@ StatusInput { input.edit.cursorVisible: true input.edit.font.pixelSize: 32 input.placeholderFont.pixelSize: 32 - input.leftPadding: -1 + input.leftPadding: 0 input.rightPadding: 0 input.topPadding: 0 input.bottomPadding: 0 diff --git a/ui/imports/shared/controls/GasValidator.qml b/ui/imports/shared/controls/GasValidator.qml index a807a6798c..b9f80ab67e 100644 --- a/ui/imports/shared/controls/GasValidator.qml +++ b/ui/imports/shared/controls/GasValidator.qml @@ -59,6 +59,7 @@ Column { } StyledText { id: txtValidationError + anchors.horizontalCenter: parent.horizontalCenter text: qsTr("Not enough ETH for gas") verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter diff --git a/ui/imports/shared/popups/SendModal.qml b/ui/imports/shared/popups/SendModal.qml index 17d7913268..b1e7a85429 100644 --- a/ui/imports/shared/popups/SendModal.qml +++ b/ui/imports/shared/popups/SendModal.qml @@ -88,6 +88,7 @@ StatusModal { showFooter: false showAdvancedFooter: d.isReady && !isNaN(parseFloat(amountToSendInput.text)) && gasValidator.isValid showAdvancedHeader: true + backgroundColor: Theme.palette.baseColor3 onSelectedAccountChanged: popup.recalculateRoutesAndFees() @@ -120,6 +121,7 @@ StatusModal { TransactionFormGroup { id: group1 anchors.fill: parent + color: Theme.palette.baseColor3 ColumnLayout { id: assetAndAmmountSelector @@ -154,6 +156,7 @@ StatusModal { id: amountToSendInput anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left + anchors.leftMargin: -Style.current.padding width: parent.width - assetSelector.width placeholderText: "0.00" + " " + assetSelector.selectedAsset.symbol errorMessageCmp.anchors.rightMargin: -100 @@ -283,6 +286,7 @@ StatusModal { input.anchors.leftMargin: 0 input.anchors.rightMargin: 0 input.textField.anchors.rightMargin: 0 + input.bgColor: Theme.palette.indirectColor1 labelFont.pixelSize: 15 labelFont.weight: Font.Normal input.height: 56 @@ -347,10 +351,11 @@ StatusModal { icon.name: "fees" } ColumnLayout { - Layout.alignment: Qt.AlignTop + Layout.alignment: Qt.AlignTop | Qt.AlignHCenter + Layout.preferredWidth: fees.width - feesIcon.width - Style.current.xlPadding GasSelector { id: gasSelector - Layout.preferredWidth: fees.width - feesIcon.width - Style.current.xlPadding + Layout.fillWidth: true getGasEthValue: popup.store.getGasEthValue getFiatValue: popup.store.getFiatValue getEstimatedTime: popup.store.getEstimatedTime @@ -377,7 +382,7 @@ StatusModal { "")) if (!gasEstimate.success) { - console.warn("error estimating gas: %1").arg(gasEstimate.error.message) + console.warn("error estimating gas: ", gasEstimate.error.message) return } @@ -387,7 +392,7 @@ StatusModal { } GasValidator { id: gasValidator - anchors.horizontalCenter: undefined + Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter selectedAccount: popup.selectedAccount selectedAmount: amountToSendInput.text === "" ? 0.0 : @@ -405,6 +410,8 @@ StatusModal { TransactionFormGroup { id: group4 + color: Theme.palette.baseColor3 + StackView.onActivated: { transactionSigner.forceActiveFocus(Qt.MouseFocusReason) } diff --git a/ui/imports/shared/views/SendModalFooter.qml b/ui/imports/shared/views/SendModalFooter.qml index 1db1537f85..b912509f04 100644 --- a/ui/imports/shared/views/SendModalFooter.qml +++ b/ui/imports/shared/views/SendModalFooter.qml @@ -27,7 +27,7 @@ Rectangle { width: parent.width height: 82 radius: 8 - color: Theme.palette.statusModal.backgroundColor + color: Theme.palette.baseColor3 Rectangle { anchors.top: parent.top diff --git a/ui/imports/shared/views/SendModalHeader.qml b/ui/imports/shared/views/SendModalHeader.qml index 2d10e69c7c..a140828772 100644 --- a/ui/imports/shared/views/SendModalHeader.qml +++ b/ui/imports/shared/views/SendModalHeader.qml @@ -32,7 +32,7 @@ StatusFloatingButtonsSelector { height: button.height radius: 8 visible: floatingHeader.visibleIndices.includes(index) && walletType !== Constants.watchWalletType - color: Theme.palette.statusAppLayout.backgroundColor + color: Theme.palette.baseColor3 StatusButton { id: button topPadding: 8 @@ -44,6 +44,7 @@ StatusFloatingButtonsSelector { icon.emojiSize: StatusQUtils.Emoji.size.middle icon.name: !emoji ? "filled-account": "" normalColor: "transparent" + hoverColor: Theme.palette.statusFloatingButtonHighlight highlighted: index === floatingHeader.currentIndex onClicked: { updatedSelectedAccount(model)