mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 12:09:57 +00:00
Account: use StandardButton for "Create new account"
This commit is contained in:
parent
ecf5c501d6
commit
a37c3756b7
1 changed files with 42 additions and 29 deletions
|
@ -164,6 +164,9 @@ Rectangle {
|
||||||
id: addressRow
|
id: addressRow
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
MoneroComponents.LabelSubheader {
|
MoneroComponents.LabelSubheader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
fontSize: 24
|
fontSize: 24
|
||||||
|
@ -171,6 +174,40 @@ Rectangle {
|
||||||
text: qsTr("Accounts") + translationManager.emptyString
|
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 {
|
ColumnLayout {
|
||||||
id: subaddressAccountListRow
|
id: subaddressAccountListRow
|
||||||
property int subaddressAccountListItemHeight: 50
|
property int subaddressAccountListItemHeight: 50
|
||||||
|
@ -349,30 +386,6 @@ Rectangle {
|
||||||
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
|
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()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue