From 94d6ef38fdd8276c402c325f7ce237625afc59f0 Mon Sep 17 00:00:00 2001 From: mmbyday Date: Tue, 16 Apr 2019 22:30:17 -0700 Subject: [PATCH] transfer: change description/pid checkbox --- pages/Transfer.qml | 92 ++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/pages/Transfer.qml b/pages/Transfer.qml index 49c3089b96..28fc5f4fa1 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -303,58 +303,62 @@ Rectangle { } ColumnLayout { - visible: appWindow.persistentSettings.showPid || paymentIdCheckbox.checked - - CheckBox { - id: paymentIdCheckbox - border: false - checkedIcon: "qrc:///images/minus-white.png" - uncheckedIcon: "qrc:///images/plus-white.png" - fontSize: paymentIdLine.labelFontSize - iconOnTheLeft: false - Layout.fillWidth: true - text: qsTr("Payment ID ( Optional )") + translationManager.emptyString - onClicked: { - if (!paymentIdCheckbox.checked) { - paymentIdLine.text = ""; + spacing: 15 + + ColumnLayout { + CheckBox { + id: descriptionCheckbox + border: false + checkedIcon: "qrc:///images/plus-in-circle-medium-white.png" + uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png" + fontSize: descriptionLine.labelFontSize + iconOnTheLeft: true + Layout.fillWidth: true + text: qsTr("Add description") + translationManager.emptyString + onClicked: { + if (!descriptionCheckbox.checked) { + descriptionLine.text = ""; + } } } - } - // payment id input - LineEditMulti { - id: paymentIdLine - fontBold: true - placeholderText: qsTr("64 hexadecimal characters") + translationManager.emptyString - Layout.fillWidth: true - wrapMode: Text.WrapAnywhere - addressValidation: false - visible: paymentIdCheckbox.checked + LineEditMulti { + id: descriptionLine + placeholderText: qsTr("Saved to local wallet history") + translationManager.emptyString + Layout.fillWidth: true + visible: descriptionCheckbox.checked + } } - } - ColumnLayout { - CheckBox { - id: descriptionCheckbox - border: false - checkedIcon: "qrc:///images/minus-white.png" - uncheckedIcon: "qrc:///images/plus-white.png" - fontSize: descriptionLine.labelFontSize - iconOnTheLeft: false - Layout.fillWidth: true - text: qsTr("Description ( Optional )") + translationManager.emptyString - onClicked: { - if (!descriptionCheckbox.checked) { - descriptionLine.text = ""; + ColumnLayout { + visible: appWindow.persistentSettings.showPid || paymentIdCheckbox.checked + // @TODO: remove after pid removal hardfork + CheckBox { + id: paymentIdCheckbox + border: false + checkedIcon: "qrc:///images/plus-in-circle-medium-white.png" + uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png" + fontSize: paymentIdLine.labelFontSize + iconOnTheLeft: true + Layout.fillWidth: true + text: qsTr("Add payment ID") + translationManager.emptyString + onClicked: { + if (!paymentIdCheckbox.checked) { + paymentIdLine.text = ""; + } } } - } - LineEditMulti { - id: descriptionLine - placeholderText: qsTr("Saved to local wallet history") + translationManager.emptyString - Layout.fillWidth: true - visible: descriptionCheckbox.checked + // payment id input + LineEditMulti { + id: paymentIdLine + fontBold: true + placeholderText: qsTr("64 hexadecimal characters") + translationManager.emptyString + Layout.fillWidth: true + wrapMode: Text.WrapAnywhere + addressValidation: false + visible: paymentIdCheckbox.checked + } } }