mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-07 10:22:07 +02:00
fix addressbook button width
This commit is contained in:
parent
6a666ead39
commit
3c8a552522
@ -27,6 +27,7 @@
|
|||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
import "../components"
|
import "../components"
|
||||||
import moneroComponents.AddressBook 1.0
|
import moneroComponents.AddressBook 1.0
|
||||||
import moneroComponents.AddressBookModel 1.0
|
import moneroComponents.AddressBookModel 1.0
|
||||||
@ -138,42 +139,46 @@ Rectangle {
|
|||||||
placeholderText: qsTr("Give this entry a name or description") + translationManager.emptyString
|
placeholderText: qsTr("Give this entry a name or description") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
StandardButton {
|
|
||||||
|
RowLayout {
|
||||||
id: addButton
|
id: addButton
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: descriptionLine.bottom
|
anchors.top: descriptionLine.bottom
|
||||||
anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
anchors.topMargin: 17
|
anchors.topMargin: 17
|
||||||
width: 60
|
|
||||||
|
|
||||||
shadowReleasedColor: "#FF4304"
|
StandardButton {
|
||||||
shadowPressedColor: "#B32D00"
|
shadowReleasedColor: "#FF4304"
|
||||||
releasedColor: "#FF6C3C"
|
shadowPressedColor: "#B32D00"
|
||||||
pressedColor: "#FF4304"
|
releasedColor: "#FF6C3C"
|
||||||
text: qsTr("Add") + translationManager.emptyString
|
pressedColor: "#FF4304"
|
||||||
enabled: checkInformation(addressLine.text, paymentIdLine.text, appWindow.persistentSettings.testnet)
|
text: qsTr("Add") + translationManager.emptyString
|
||||||
|
enabled: checkInformation(addressLine.text, paymentIdLine.text, appWindow.persistentSettings.testnet)
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (!currentWallet.addressBook.addRow(addressLine.text.trim(), paymentIdLine.text.trim(), descriptionLine.text)) {
|
if (!currentWallet.addressBook.addRow(addressLine.text.trim(), paymentIdLine.text.trim(), descriptionLine.text)) {
|
||||||
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
||||||
// TODO: check currentWallet.addressBook.errorString() instead.
|
// TODO: check currentWallet.addressBook.errorString() instead.
|
||||||
if(currentWallet.addressBook.errorCode() === AddressBook.Invalid_Address)
|
if(currentWallet.addressBook.errorCode() === AddressBook.Invalid_Address)
|
||||||
informationPopup.text = qsTr("Invalid address") + translationManager.emptyString
|
informationPopup.text = qsTr("Invalid address") + translationManager.emptyString
|
||||||
else if(currentWallet.addressBook.errorCode() === AddressBook.Invalid_Payment_Id)
|
else if(currentWallet.addressBook.errorCode() === AddressBook.Invalid_Payment_Id)
|
||||||
informationPopup.text = currentWallet.addressBook.errorString()
|
informationPopup.text = currentWallet.addressBook.errorString()
|
||||||
else
|
else
|
||||||
informationPopup.text = qsTr("Can't create entry") + translationManager.emptyString
|
informationPopup.text = qsTr("Can't create entry") + translationManager.emptyString
|
||||||
|
|
||||||
informationPopup.onCloseCallback = null
|
informationPopup.onCloseCallback = null
|
||||||
informationPopup.open();
|
informationPopup.open();
|
||||||
} else {
|
} else {
|
||||||
addressLine.text = "";
|
addressLine.text = "";
|
||||||
paymentIdLine.text = "";
|
paymentIdLine.text = "";
|
||||||
descriptionLine.text = "";
|
descriptionLine.text = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: expandItem
|
id: expandItem
|
||||||
property bool expanded: false
|
property bool expanded: false
|
||||||
|
Loading…
Reference in New Issue
Block a user