diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2021-11-26 22:55:24 -0600 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2021-11-26 22:55:24 -0600 |
| commit | 9c901b33f0d483bc0927e226641e43f375c0728a (patch) | |
| tree | 31ad211ab76edc50b33e05f0e3454d53598c8b2c /pages | |
| parent | a0ff56fbefb8ab836034d598f2a13021e0968d6d (diff) | |
| parent | a37c3756b7af947917bf70d15be4855bd3c69441 (diff) | |
| download | monzero-gui-9c901b33f0d483bc0927e226641e43f375c0728a.tar.gz monzero-gui-9c901b33f0d483bc0927e226641e43f375c0728a.tar.xz monzero-gui-9c901b33f0d483bc0927e226641e43f375c0728a.zip | |
Merge pull request #3739
a37c375 Account: use StandardButton for 'Create new account' (rating89us)
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/Account.qml | 71 |
1 files changed, 42 insertions, 29 deletions
diff --git a/pages/Account.qml b/pages/Account.qml index 36cd4a09..b1410570 100644 --- a/pages/Account.qml +++ b/pages/Account.qml @@ -164,11 +164,48 @@ Rectangle { id: addressRow spacing: 0 - MoneroComponents.LabelSubheader { - Layout.fillWidth: true - fontSize: 24 - textFormat: Text.RichText - text: qsTr("Accounts") + translationManager.emptyString + RowLayout { + spacing: 0 + + MoneroComponents.LabelSubheader { + Layout.fillWidth: true + fontSize: 24 + textFormat: Text.RichText + text: qsTr("Accounts") + translationManager.emptyString + } + + MoneroComponents.StandardButton { + id: createNewAccountButton + visible: !selectAndSend + small: true + text: qsTr("Create new account") + translationManager.emptyString + fontSize: 13 + onClicked: { + inputDialog.labelText = qsTr("Set the label of the new account:") + translationManager.emptyString + inputDialog.onAcceptedCallback = function() { + appWindow.currentWallet.subaddressAccount.addRow(inputDialog.inputText) + appWindow.currentWallet.switchSubaddressAccount(appWindow.currentWallet.numSubaddressAccounts() - 1) + appWindow.onWalletUpdate(); + } + inputDialog.onRejectedCallback = null; + inputDialog.open() + } + + Rectangle { + anchors.top: createNewAccountButton.bottom + anchors.topMargin: 8 + anchors.left: createNewAccountButton.left + anchors.right: createNewAccountButton.right + height: 2 + color: MoneroComponents.Style.appWindowBorderColor + + MoneroEffects.ColorTransition { + targetObj: parent + blackColor: MoneroComponents.Style._b_appWindowBorderColor + whiteColor: MoneroComponents.Style._w_appWindowBorderColor + } + } + } } ColumnLayout { @@ -349,30 +386,6 @@ Rectangle { whiteColor: MoneroComponents.Style._w_appWindowBorderColor } } - - MoneroComponents.CheckBox { - id: addNewAccountCheckbox - visible: !selectAndSend - border: false - uncheckedIcon: FontAwesome.plusCircle - toggleOnClick: false - fontAwesomeIcons: true - fontSize: 16 - iconOnTheLeft: true - Layout.fillWidth: true - Layout.topMargin: 10 - text: qsTr("Create new account") + translationManager.emptyString; - onClicked: { - inputDialog.labelText = qsTr("Set the label of the new account:") + translationManager.emptyString - inputDialog.onAcceptedCallback = function() { - appWindow.currentWallet.subaddressAccount.addRow(inputDialog.inputText) - appWindow.currentWallet.switchSubaddressAccount(appWindow.currentWallet.numSubaddressAccounts() - 1) - appWindow.onWalletUpdate(); - } - inputDialog.onRejectedCallback = null; - inputDialog.open() - } - } } } |
