Merge pull request #498

4e29c14 transfer: increased top margin (Jaquee)
30f87a1 Transfer: hide advanced options (Jaquee)
This commit is contained in:
Riccardo Spagni 2017-03-03 16:36:34 +02:00
commit 988e299290
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
2 changed files with 310 additions and 297 deletions

View File

@ -829,6 +829,7 @@ ApplicationWindow {
property string logCategories: "" property string logCategories: ""
property string daemonUsername: "" property string daemonUsername: ""
property string daemonPassword: "" property string daemonPassword: ""
property bool transferShowAdvanced: false
} }
// Information dialog // Information dialog

View File

@ -42,6 +42,7 @@ Rectangle {
color: "#F0EEEE" color: "#F0EEEE"
property string startLinkText: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style><font size='2'> (</font><a href='#'>Start daemon</a><font size='2'>)</font>" property string startLinkText: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style><font size='2'> (</font><a href='#'>Start daemon</a><font size='2'>)</font>"
property bool showAdvanced: false
function scaleValueToMixinCount(scaleValue) { function scaleValueToMixinCount(scaleValue) {
var scaleToMixinCount = [4,5,6,7,8,9,10,11,12,13,14,15,20,25]; var scaleToMixinCount = [4,5,6,7,8,9,10,11,12,13,14,15,20,25];
@ -111,7 +112,9 @@ Rectangle {
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
height:550 anchors.topMargin: 20
height: 400
Label { Label {
id: amountLabel id: amountLabel
anchors.left: parent.left anchors.left: parent.left
@ -132,6 +135,7 @@ Rectangle {
text: qsTr("Transaction priority") + translationManager.emptyString text: qsTr("Transaction priority") + translationManager.emptyString
} }
Row { Row {
id: amountRow id: amountRow
anchors.top: amountLabel.bottom anchors.top: amountLabel.bottom
@ -168,7 +172,7 @@ Rectangle {
//anchors.top: amountLine.top //anchors.top: amountLine.top
//anchors.bottom: amountLine.bottom //anchors.bottom: amountLine.bottom
width: 60 width: 60
text: qsTr("All") + translationManager.emptyString text: qsTr("all") + translationManager.emptyString
shadowReleasedColor: "#FF4304" shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00" shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C" releasedColor: "#FF6C3C"
@ -178,11 +182,13 @@ Rectangle {
} }
} }
ListModel { ListModel {
id: priorityModel id: priorityModel
// ListElement: cannot use script for property value, so // ListElement: cannot use script for property value, so
// code like this wont work: // code like this wont work:
// ListElement { column1: qsTr("Low") + translationManager.emptyString ; column2: ""; priority: PendingTransaction.Priority_Low } // ListElement { column1: qsTr("LOW") + translationManager.emptyString ; column2: ""; priority: PendingTransaction.Priority_Low }
ListElement { column1: qsTr("Low (x1 fee)") ; column2: ""; priority: PendingTransaction.Priority_Low } ListElement { column1: qsTr("Low (x1 fee)") ; column2: ""; priority: PendingTransaction.Priority_Low }
ListElement { column1: qsTr("Medium (x20 fee)") ; column2: ""; priority: PendingTransaction.Priority_Medium } ListElement { column1: qsTr("Medium (x20 fee)") ; column2: ""; priority: PendingTransaction.Priority_Medium }
@ -204,49 +210,11 @@ Rectangle {
z: 1 z: 1
} }
Label {
id: privacyLabel
anchors.left: parent.left
anchors.right: parent.right
anchors.top: amountRow.bottom
anchors.leftMargin: 17
anchors.rightMargin: 17
anchors.topMargin: 30
fontSize: 14
text: ""
}
PrivacyLevel {
id: privacyLevelItem
anchors.left: parent.left
anchors.right: parent.right
anchors.top: privacyLabel.bottom
anchors.leftMargin: 17
anchors.rightMargin: 17
anchors.topMargin: 5
onFillLevelChanged: updateMixin()
}
Label {
id: costLabel
anchors.right: parent.right
anchors.top: amountRow.bottom
anchors.leftMargin: 17
anchors.rightMargin: 17
anchors.topMargin: 30
fontSize: 14
text: qsTr("Transaction cost")
}
Label { Label {
id: addressLabel id: addressLabel
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: privacyLevelItem.bottom anchors.top: amountRow.bottom
anchors.leftMargin: 17 anchors.leftMargin: 17
anchors.rightMargin: 17 anchors.rightMargin: 17
anchors.topMargin: 30 anchors.topMargin: 30
@ -270,7 +238,7 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 17 anchors.leftMargin: 17
anchors.topMargin: 5 anchors.topMargin: 5
text: qsTr("QRCODE") + translationManager.emptyString text: qsTr("QR Code") + translationManager.emptyString
shadowReleasedColor: "#FF4304" shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00" shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C" releasedColor: "#FF6C3C"
@ -432,7 +400,6 @@ Rectangle {
} }
} }
} // pageRoot } // pageRoot
Rectangle { Rectangle {
@ -452,23 +419,68 @@ Rectangle {
enabled: !viewOnly || pageRoot.enabled enabled: !viewOnly || pageRoot.enabled
RowLayout { RowLayout {
Label { // Label {
id: manageWalletLabel // id: manageWalletLabel
Layout.fillWidth: true // Layout.fillWidth: true
color: "#4A4949" // color: "#4A4949"
text: qsTr("Advanced") + translationManager.emptyString // text: qsTr("Advanced options") + translationManager.emptyString
fontSize: 16 // fontSize: 16
Layout.topMargin: 20 // Layout.topMargin: 20
// }
CheckBox {
id: showAdvancedCheckbox
checked: persistentSettings.transferShowAdvanced
onClicked: {
persistentSettings.transferShowAdvanced = !persistentSettings.transferShowAdvanced
}
text: qsTr("Show advanced options") + translationManager.emptyString
checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
} }
} }
Rectangle { Rectangle {
visible: persistentSettings.transferShowAdvanced
Layout.fillWidth: true Layout.fillWidth: true
height: 1 height: 1
color: "#DEDEDE" color: "#DEDEDE"
Layout.bottomMargin: 30
} }
RowLayout { RowLayout {
visible: persistentSettings.transferShowAdvanced
anchors.left: parent.left
anchors.right: parent.right
Label {
id: privacyLabel
fontSize: 14
text: ""
}
Label {
id: costLabel
fontSize: 14
text: qsTr("Transaction cost")
anchors.right: parent.right
}
}
PrivacyLevel {
visible: persistentSettings.transferShowAdvanced
id: privacyLevelItem
anchors.left: parent.left
anchors.right: parent.right
onFillLevelChanged: updateMixin()
}
RowLayout {
visible: persistentSettings.transferShowAdvanced
Layout.topMargin: 50
StandardButton { StandardButton {
id: sweepUnmixableButton id: sweepUnmixableButton
text: qsTr("Sweep Unmixable") + translationManager.emptyString text: qsTr("Sweep Unmixable") + translationManager.emptyString