mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-02-07 16:43:42 +02:00
Merge pull request #547
3c8a552
fix addressbook button width (Jaquee)6a666ea
fix dynamic width on send btn (Jaquee)1918c5e
fix dynamic button width (Jaquee)
This commit is contained in:
commit
fd4619628c
@ -43,8 +43,8 @@ Item {
|
|||||||
signal clicked()
|
signal clicked()
|
||||||
|
|
||||||
// Dynamic label width
|
// Dynamic label width
|
||||||
width: label.contentWidth + 20
|
Layout.minimumWidth: (label.contentWidth > 100)? label.contentWidth + 20 : 100
|
||||||
Layout.minimumWidth: 100
|
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -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
|
||||||
|
@ -84,7 +84,6 @@ Rectangle {
|
|||||||
RowLayout {
|
RowLayout {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: closeWalletButton
|
id: closeWalletButton
|
||||||
width: 100
|
|
||||||
text: qsTr("Close wallet") + translationManager.emptyString
|
text: qsTr("Close wallet") + translationManager.emptyString
|
||||||
shadowReleasedColor: "#FF4304"
|
shadowReleasedColor: "#FF4304"
|
||||||
shadowPressedColor: "#B32D00"
|
shadowPressedColor: "#B32D00"
|
||||||
@ -118,7 +117,6 @@ Rectangle {
|
|||||||
releasedColor: "#FF6C3C"
|
releasedColor: "#FF6C3C"
|
||||||
pressedColor: "#FF4304"
|
pressedColor: "#FF4304"
|
||||||
text: qsTr("Show seed") + translationManager.emptyString
|
text: qsTr("Show seed") + translationManager.emptyString
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
settingsPasswordDialog.open();
|
settingsPasswordDialog.open();
|
||||||
}
|
}
|
||||||
|
@ -375,31 +375,36 @@ Rectangle {
|
|||||||
return amount_ok && address_ok && payment_id_ok
|
return amount_ok && address_ok && payment_id_ok
|
||||||
}
|
}
|
||||||
|
|
||||||
StandardButton {
|
|
||||||
id: sendButton
|
RowLayout {
|
||||||
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
|
|
||||||
text: qsTr("Send") + translationManager.emptyString
|
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
enabled : !appWindow.viewOnly && pageRoot.checkInformation(amountLine.text, addressLine.text, paymentIdLine.text, appWindow.persistentSettings.testnet)
|
|
||||||
onClicked: {
|
|
||||||
console.log("Transfer: paymentClicked")
|
|
||||||
var priority = priorityModel.get(priorityDropdown.currentIndex).priority
|
|
||||||
console.log("priority: " + priority)
|
|
||||||
console.log("amount: " + amountLine.text)
|
|
||||||
addressLine.text = addressLine.text.trim()
|
|
||||||
paymentIdLine.text = paymentIdLine.text.trim()
|
|
||||||
root.paymentClicked(addressLine.text, paymentIdLine.text, amountLine.text, scaleValueToMixinCount(privacyLevelItem.fillLevel),
|
|
||||||
priority, descriptionLine.text)
|
|
||||||
|
|
||||||
|
StandardButton {
|
||||||
|
id: sendButton
|
||||||
|
text: qsTr("Send") + translationManager.emptyString
|
||||||
|
shadowReleasedColor: "#FF4304"
|
||||||
|
shadowPressedColor: "#B32D00"
|
||||||
|
releasedColor: "#FF6C3C"
|
||||||
|
pressedColor: "#FF4304"
|
||||||
|
enabled : !appWindow.viewOnly && pageRoot.checkInformation(amountLine.text, addressLine.text, paymentIdLine.text, appWindow.persistentSettings.testnet)
|
||||||
|
onClicked: {
|
||||||
|
console.log("Transfer: paymentClicked")
|
||||||
|
var priority = priorityModel.get(priorityDropdown.currentIndex).priority
|
||||||
|
console.log("priority: " + priority)
|
||||||
|
console.log("amount: " + amountLine.text)
|
||||||
|
addressLine.text = addressLine.text.trim()
|
||||||
|
paymentIdLine.text = paymentIdLine.text.trim()
|
||||||
|
root.paymentClicked(addressLine.text, paymentIdLine.text, amountLine.text, scaleValueToMixinCount(privacyLevelItem.fillLevel),
|
||||||
|
priority, descriptionLine.text)
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // pageRoot
|
} // pageRoot
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
Loading…
Reference in New Issue
Block a user