StandardButton - removed unused properties and some layout changes to settings page

This commit is contained in:
Sander Ferdinand 2017-12-09 17:46:03 +01:00 committed by moneromooo-monero
parent 0477af1b0d
commit be9cb8931c
17 changed files with 33 additions and 156 deletions

View file

@ -110,10 +110,6 @@ Window {
id: okButton
width: 120
fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Close") + translationManager.emptyString
onClicked: {
root.close()
@ -138,10 +134,6 @@ Window {
// id: sendCommandButton
// enabled: sendCommandText.text.length > 0
// fontSize: 14
// shadowReleasedColor: "#FF4304"
// shadowPressedColor: "#B32D00"
// releasedColor: "#FF6C3C"
// pressedColor: "#FF4304"
// text: qsTr("Send command")
// onClicked: {
// daemonManager.sendCommand(sendCommandText.text,currentWallet.testnet);

View file

@ -108,10 +108,6 @@ Window {
id: okButton
visible:false
fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Start daemon (%1)").arg(countDown)
KeyNavigation.tab: cancelButton
onClicked: {
@ -125,10 +121,6 @@ Window {
MoneroComponents.StandardButton {
id: cancelButton
fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Use custom settings")
onClicked: {

View file

@ -92,10 +92,6 @@ Item {
StandardButton {
id: button
anchors.fill: parent
shadowReleasedColor: "#DBDBDB"
shadowPressedColor: "#888888"
releasedColor: "#F0EEEE"
pressedColor: "#DBDBDB"
icon: "../images/datePicker.png"
visible: !datePicker.expanded
onClicked: datePicker.expanded = true

View file

@ -96,10 +96,6 @@ ListView {
anchors.topMargin: parent.height/2 - this.height/2
width: 80
fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Details")
onClicked: {
var tx_key = currentWallet.getTxKey(hash)

View file

@ -149,10 +149,6 @@ Item {
MoneroComponents.StandardButton {
id: cancelButton
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Cancel") + translationManager.emptyString
KeyNavigation.tab: passwordInput
onClicked: {
@ -162,10 +158,6 @@ Item {
}
MoneroComponents.StandardButton {
id: okButton
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Continue")
KeyNavigation.tab: cancelButton
onClicked: {

View file

@ -33,9 +33,12 @@ import QtQuick.Layouts 1.1
GridLayout {
columns: (isMobile) ? 1 : 2
columnSpacing: 32
id: root
property alias daemonAddrText: daemonAddr.text
property alias daemonPortText: daemonPort.text
property alias daemonAddrLabelText: daemonAddr.labelText
property alias daemonPortLabelText: daemonPort.labelText
signal editingFinished()
@ -50,7 +53,6 @@ GridLayout {
onEditingFinished: root.editingFinished()
}
LineEdit {
id: daemonPort
Layout.fillWidth: true

View file

@ -33,10 +33,6 @@ import "." 1.0
Item {
id: button
height: 37 * scaleRatio
property string shadowPressedColor: Style.buttonBackgroundColor
property string shadowReleasedColor: Style.buttonBackgroundColor
property string pressedColor: Style.buttonBackgroundColor
property string releasedColor: Style.buttonBackgroundColor
property string icon: ""
property string textColor: button.enabled? Style.buttonTextColor: Style.buttonTextColorDisabled
property int fontSize: 16 * scaleRatio
@ -57,8 +53,8 @@ Item {
anchors.right: parent.right
height: parent.height - 1
radius: 3
// color: parent.enabled ? Style.buttonBackgroundColor : Style.buttonBackgroundColorDisabled
color: parent.enabled ? Style.buttonBackgroundColor : Style.buttonBackgroundColorDisabled
border.color: Qt.darker(parent.releasedColor)
border.width: parent.focus ? 1 : 0
MouseArea{
@ -68,32 +64,18 @@ Item {
propagateComposedEvents: true
// possibly do some hover effects here
onEntered: {
if(button.enabled) parent.color = Style.buttonBackgroundColorHover;
else parent.color = Style.buttonBackgroundColorDisabledHover;
// if(button.enabled) parent.color = Style.buttonBackgroundColorHover;
// else parent.color = Style.buttonBackgroundColorDisabledHover;
}
onExited: {
if(button.enabled) parent.color = Style.buttonBackgroundColor;
else parent.color = Style.buttonBackgroundColorDisabled;
// if(button.enabled) parent.color = Style.buttonBackgroundColor;
// else parent.color = Style.buttonBackgroundColorDisabled;
}
}
}
// Rectangle {
// anchors.left: parent.left
// anchors.right: parent.right
// height: parent.height - 1
// y: buttonArea.pressed ? 1 : 0
// color: {
// parent.enabled ? (buttonArea.pressed ? parent.pressedColor : parent.releasedColor)
// : Qt.lighter(parent.releasedColor)
// }
// //radius: 4
// }
Text {
id: label
anchors.verticalCenter: parent.verticalCenter
@ -105,7 +87,6 @@ Item {
font.pixelSize: buttonArea.pressed ? button.fontSize - 1 : button.fontSize
color: parent.textColor
visible: parent.icon === ""
// font.capitalization : Font.Capitalize
}
Image {
@ -118,6 +99,7 @@ Item {
id: buttonArea
anchors.fill: parent
onClicked: doClick()
cursorShape: Qt.PointingHandCursor
}
Keys.onSpacePressed: doClick()

View file

@ -140,10 +140,6 @@ Rectangle {
MoneroComponents.StandardButton {
id: cancelButton
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Cancel") + translationManager.emptyString
onClicked: {
root.close()
@ -153,10 +149,6 @@ Rectangle {
MoneroComponents.StandardButton {
id: okButton
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("OK")
KeyNavigation.tab: cancelButton
onClicked: {

View file

@ -48,10 +48,6 @@ Rectangle {
StandardButton {
id: qrfinderButton
text: qsTr("Qr Code") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
visible : appWindow.qrScannerEnabled
enabled : visible
width: visible ? 60 * scaleRatio : 0
@ -91,10 +87,6 @@ Rectangle {
id: addButton
Layout.bottomMargin: 17 * scaleRatio
StandardButton {
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Add") + translationManager.emptyString
enabled: checkInformation(addressLine.text, paymentIdLine.text, appWindow.persistentSettings.nettype)

View file

@ -250,10 +250,6 @@ Rectangle {
anchors.leftMargin: 17
width: 60
text: qsTr("Filter") + translationManager.emptyString
shadowReleasedColor: "#4D0051"
shadowPressedColor: "#2D002F"
releasedColor: "#6B0072"
pressedColor: "#4D0051"
onClicked: {
// Apply filter here;

View file

@ -133,10 +133,6 @@ Rectangle {
id: startSoloMinerButton
width: 110
text: qsTr("Start mining") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
onClicked: {
var success = walletManager.startMining(appWindow.currentWallet.address(0, 0), soloMinerThreadsLine.text, persistentSettings.allow_background_mining, persistentSettings.miningIgnoreBattery)
if (success) {
@ -158,10 +154,6 @@ Rectangle {
id: stopSoloMinerButton
width: 110
text: qsTr("Stop mining") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
onClicked: {
walletManager.stopMining()
update()

View file

@ -405,17 +405,27 @@ Rectangle {
RowLayout {
visible: persistentSettings.useRemoteNode
ColumnLayout {
Layout.fillWidth: true
RemoteNodeEdit {
id: remoteNodeEdit
Layout.minimumWidth: 100 * scaleRatio
property var rna: persistentSettings.remoteNodeAddress
daemonAddrText: rna.search(":") != -1 ? rna.split(":")[0].trim() : ""
daemonPortText: rna.search(":") != -1 ? (rna.split(":")[1].trim() == "") ? "18081" : rna.split(":")[1] : ""
daemonAddrLabelText: qsTr("Address")
daemonPortLabelText: qsTr("Port")
onEditingFinished: {
persistentSettings.remoteNodeAddress = remoteNodeEdit.getAddress();
console.log("setting remote node to " + persistentSettings.remoteNodeAddress)
}
}
}
}
RowLayout{
visible: persistentSettings.useRemoteNode
Layout.fillWidth: true
StandardButton {
id: remoteNodeSave
@ -433,7 +443,6 @@ Rectangle {
}
}
}
}
RowLayout {
visible: !isMobile

View file

@ -143,10 +143,6 @@ Rectangle {
id: signMessageButton
anchors.right: parent.right
text: qsTr("Sign") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
enabled: true
onClicked: {
var signature = appWindow.currentWallet.signMessage(signMessageLine.text, false)
@ -181,10 +177,6 @@ Rectangle {
id: loadFileToSignButton
anchors.rightMargin: 17 * scaleRatio
text: qsTr("Select") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
enabled: true
onClicked: {
signFileDialog.open()
@ -213,10 +205,6 @@ Rectangle {
id: signFileButton
anchors.right: parent.right
text: qsTr("Sign") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
enabled: true
onClicked: {
var signature = appWindow.currentWallet.signMessage(signFileLine.text, true)
@ -300,10 +288,6 @@ Rectangle {
id: verifyMessageButton
anchors.right: parent.right
text: qsTr("Verify") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
enabled: true
onClicked: {
var verified = appWindow.currentWallet.verifySignedMessage(verifyMessageLine.text, verifyAddressLine.text, verifySignatureLine.text, false)
@ -338,10 +322,6 @@ Rectangle {
id: loadFileToVerifyButton
anchors.rightMargin: 17 * scaleRatio
text: qsTr("Select") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
enabled: true
onClicked: {
verifyFileDialog.open()
@ -369,10 +349,6 @@ Rectangle {
id: verifyFileButton
anchors.right: parent.right
text: qsTr("Verify") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
enabled: true
onClicked: {
var verified = appWindow.currentWallet.verifySignedMessage(verifyFileLine.text, verifyAddressLine.text, verifySignatureLine.text, true)

View file

@ -436,10 +436,6 @@ Rectangle {
StandardButton {
id: submitTxButton
text: qsTr("Submit tx file") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
visible: appWindow.viewOnly
enabled: pageRoot.enabled
onClicked: {

View file

@ -324,11 +324,7 @@ Rectangle {
anchors.topMargin: 17
width: 60
text: qsTr("Check") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
enabled: checkTxID(checkProofTxIdLine.text) && checkSignature(checkProofSignatureLine.text) && ((checkProofSignatureLine.text.indexOf("SpendProofV") === 0 && checkProofAddressLine.text.length == 0) || (checkProofSignatureLine.text.indexOf("SpendProofV") !== 0 && checkAddress(checkProofAddressLine.text, appWindow.persistentSettings.nettype)))
enabled: checkTxID(checkProofTxIdLine.text) && checkSignature(checkProofSignatureLine.text) && ((checkProofSignatureLine.text.indexOf("SpendProofV") === 0 && checkProofAddressLine.text.length == 0) || (checkProofSignatureLine.text.indexOf("SpendProofV") !== 0 && checkAddress(checkProofAddressLine.text, appWindow.persistentSettings.testnet)))
onClicked: {
console.log("checkProof: Check clicked: txid " + checkProofTxIdLine.text + ", address " + checkProofAddressLine.text + ", message " + checkProofMessageLine.text + ", signature " + checkProofSignatureLine.text);
root.checkProofClicked(checkProofTxIdLine.text, checkProofAddressLine.text, checkProofMessageLine.text, checkProofSignatureLine.text)

View file

@ -365,10 +365,6 @@ ColumnLayout {
anchors.bottom: parent.bottom
anchors.margins: (isMobile) ? 20 * scaleRatio : 50 * scaleRatio
text: qsTr("USE MONERO") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
visible: parent.paths[currentPath][currentPage] === finishPage
onClicked: {
wizard.applySettings();
@ -382,10 +378,6 @@ ColumnLayout {
anchors.bottom: parent.bottom
anchors.margins: (isMobile) ? 20 * scaleRatio : 50
text: qsTr("Create wallet") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
visible: currentPath === "create_view_only_wallet" && parent.paths[currentPath][currentPage] === passwordPage
enabled: passwordPage.passwordsMatch
onClicked: {
@ -414,10 +406,6 @@ ColumnLayout {
anchors.bottom: parent.bottom
anchors.margins: (isMobile) ? 20 * scaleRatio : 50
text: qsTr("Abort") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
visible: currentPath === "create_view_only_wallet" && parent.paths[currentPath][currentPage] === passwordPage
onClicked: {
wizard.restart();

View file

@ -176,10 +176,6 @@ ColumnLayout {
StandardButton {
id: recoverFromSeedButton
text: qsTr("Restore from seed") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
enabled: recoverFromKeys.visible
onClicked: {
recoverFromSeedMode = true;
@ -190,10 +186,6 @@ ColumnLayout {
StandardButton {
id: recoverFromKeysButton
text: qsTr("Restore from keys") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
enabled: recoverFromSeed.visible
onClicked: {
recoverFromSeedMode = false;
@ -204,10 +196,6 @@ ColumnLayout {
StandardButton {
id: qrfinderButton
text: qsTr("From QR Code") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
visible : true //appWindow.qrScannerEnabled
enabled : visible
onClicked: {