mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 08:17:59 +00:00
AddressBook: use small StandardButton; adjust buttons alignment/order; remove paste button
This commit is contained in:
parent
ecf5c501d6
commit
9846bff226
1 changed files with 42 additions and 40 deletions
|
@ -97,6 +97,8 @@ Rectangle {
|
|||
MoneroComponents.StandardButton {
|
||||
id: addFirstEntryButton
|
||||
Layout.topMargin: 20
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
small: true
|
||||
text: qsTr("Add an address") + translationManager.emptyString
|
||||
onClicked: {
|
||||
root.showAddAddress();
|
||||
|
@ -115,6 +117,18 @@ Rectangle {
|
|||
text: qsTr("Address book") + translationManager.emptyString
|
||||
}
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
id: addAddressButton
|
||||
Layout.bottomMargin: 8
|
||||
Layout.alignment: Qt.AlignRight
|
||||
small: true
|
||||
text: qsTr("Add address") + translationManager.emptyString
|
||||
fontSize: 13
|
||||
onClicked: {
|
||||
root.showAddAddress();
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: addressBookListRow
|
||||
property int addressBookListItemHeight: 50
|
||||
|
@ -287,23 +301,6 @@ Rectangle {
|
|||
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.CheckBox {
|
||||
id: addNewEntryCheckbox
|
||||
border: false
|
||||
uncheckedIcon: FontAwesome.plusCircle
|
||||
toggleOnClick: false
|
||||
fontAwesomeIcons: true
|
||||
fontSize: 16
|
||||
iconOnTheLeft: true
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 10
|
||||
text: qsTr("Add address") + translationManager.emptyString;
|
||||
onClicked: {
|
||||
root.showAddAddress();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
ColumnLayout {
|
||||
id: addContactLayout
|
||||
|
@ -335,7 +332,7 @@ Rectangle {
|
|||
}
|
||||
wrapMode: Text.WrapAnywhere
|
||||
addressValidation: true
|
||||
pasteButton: true
|
||||
pasteButton: false
|
||||
onTextChanged: {
|
||||
const parsed = walletManager.parse_uri_to_object(addressLine.text);
|
||||
if (!parsed.error) {
|
||||
|
@ -437,10 +434,37 @@ Rectangle {
|
|||
}
|
||||
RowLayout {
|
||||
Layout.topMargin: 20
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
id: cancelButton
|
||||
KeyNavigation.backtab: addButton
|
||||
KeyNavigation.tab: deleteButton.visible ? deleteButton : addressLine
|
||||
small: true
|
||||
text: qsTr("Cancel") + translationManager.emptyString
|
||||
primary: false
|
||||
onClicked: root.showAddressBook();
|
||||
}
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
id: deleteButton
|
||||
KeyNavigation.backtab: cancelButton
|
||||
KeyNavigation.tab: addressLine
|
||||
small: true
|
||||
visible: root.editEntry
|
||||
text: qsTr("Delete") + translationManager.emptyString
|
||||
primary: false
|
||||
onClicked: {
|
||||
currentWallet.addressBook.deleteRow(addressBookListView.currentIndex);
|
||||
root.showAddressBook();
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
id: addButton
|
||||
KeyNavigation.backtab: descriptionLine
|
||||
KeyNavigation.tab: cancelButton
|
||||
small: true
|
||||
text: (root.editEntry ? qsTr("Save") : qsTr("Add")) + translationManager.emptyString
|
||||
enabled: root.checkInformation(addressLine.text, appWindow.persistentSettings.nettype)
|
||||
onClicked: {
|
||||
|
@ -463,28 +487,6 @@ Rectangle {
|
|||
root.showAddressBook()
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
id: cancelButton
|
||||
KeyNavigation.backtab: addButton
|
||||
KeyNavigation.tab: deleteButton.visible ? deleteButton : addressLine
|
||||
text: qsTr("Cancel") + translationManager.emptyString
|
||||
primary: false
|
||||
onClicked: root.showAddressBook();
|
||||
}
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
id: deleteButton
|
||||
KeyNavigation.backtab: cancelButton
|
||||
KeyNavigation.tab: addressLine
|
||||
visible: root.editEntry
|
||||
text: qsTr("Delete") + translationManager.emptyString
|
||||
primary: false
|
||||
onClicked: {
|
||||
currentWallet.addressBook.deleteRow(addressBookListView.currentIndex);
|
||||
root.showAddressBook();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue