Replacing checkbox, using default values from component

This commit is contained in:
Sander Ferdinand 2017-12-07 16:35:42 +01:00 committed by moneromooo-monero
parent 5028491ab3
commit af9e4e86f0
9 changed files with 3 additions and 52 deletions

View file

@ -32,7 +32,7 @@ import QtQuick.Layouts 1.1
RowLayout {
id: checkBox
property alias text: label.text
property string checkedIcon
property string checkedIcon: "../images/checkedIcon-black.png"
property string uncheckedIcon
property bool checked: false
property alias background: backgroundRect.color

View file

@ -291,8 +291,6 @@ Rectangle {
anchors.left: filterButton.right
anchors.bottom: filterButton.bottom
anchors.leftMargin: 17
checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
onClicked: {
if(checked) tableRect.height = Qt.binding(function(){ return tableRect.collapsedHeight })
else tableRect.height = Qt.binding(function(){ return tableRect.middleHeight })

View file

@ -102,8 +102,6 @@ Rectangle {
checked: persistentSettings.allow_background_mining
onClicked: {persistentSettings.allow_background_mining = checked}
text: qsTr("Background mining (experimental)") + translationManager.emptyString
checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
}
}
@ -118,8 +116,6 @@ Rectangle {
checked: !persistentSettings.miningIgnoreBattery
onClicked: {persistentSettings.miningIgnoreBattery = !checked}
text: qsTr("Enable mining when running on battery") + translationManager.emptyString
checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
}
}

View file

@ -331,15 +331,7 @@ Rectangle {
Layout.bottomMargin: 17 * scaleRatio
Layout.topMargin: 17 * scaleRatio
text: qsTr("Send") + translationManager.emptyString
<<<<<<< HEAD
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
enabled : !appWindow.viewOnly && pageRoot.checkInformation(amountLine.text, addressLine.text, paymentIdLine.text, appWindow.persistentSettings.nettype)
=======
enabled : !appWindow.viewOnly && pageRoot.checkInformation(amountLine.text, addressLine.text, paymentIdLine.text, appWindow.persistentSettings.testnet)
>>>>>>> Transfer page QML development
onClicked: {
console.log("Transfer: paymentClicked")
var priority = priorityModelV5.get(priorityDropdown.currentIndex).priority
@ -399,7 +391,6 @@ Rectangle {
persistentSettings.transferShowAdvanced = !persistentSettings.transferShowAdvanced
}
text: qsTr("Show advanced options") + translationManager.emptyString
checkedIcon: "../images/checkedIcon-black.png"
}
}

View file

@ -191,5 +191,6 @@
<file>images/lightning-white.png</file>
<file>images/middlePanelBg.jpg</file>
<file>components/InputMulti.qml</file>
<file>images/checkedIcon-black.png</file>
</qresource>
</RCC>

View file

@ -100,8 +100,6 @@ Item {
background: "#F0EEEE"
fontColor: "#4A4646"
fontSize: 18
checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
checked: true
}
@ -129,8 +127,6 @@ Item {
background: "#F0EEEE"
fontColor: "#4A4646"
fontSize: 18
checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
checked: true
}
@ -160,8 +156,6 @@ Item {
background: "#F0EEEE"
fontColor: "#4A4646"
fontSize: 18
checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
checked: true
}

View file

@ -127,8 +127,6 @@ ColumnLayout {
background: "#FFFFFF"
fontColor: "#4A4646"
fontSize: 16 * scaleRatio
checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
checked: !appWindow.persistentSettings.useRemoteNode && !isAndroid && !isIOS
visible: !isAndroid && !isIOS
onClicked: {
@ -189,8 +187,6 @@ ColumnLayout {
background: "#FFFFFF"
fontColor: "#4A4646"
fontSize: 16 * scaleRatio
checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
checked: appWindow.persistentSettings.useRemoteNode
onClicked: {
checked = true

View file

@ -114,8 +114,6 @@ Item {
background: "#F0EEEE"
fontColor: "#4A4646"
fontSize: 18
checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
checked: true
}
@ -179,8 +177,6 @@ Item {
background: "#F0EEEE"
fontColor: "#4A4646"
fontSize: 18
checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
checked: true
}

View file

@ -248,28 +248,7 @@ ColumnLayout {
background: "#FFFFFF"
fontColor: "#4A4646"
fontSize: 16 * scaleRatio
checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
checked: appWindow.persistentSettings.nettype === NetworkType.TESTNET;
onClicked: {
persistentSettings.nettype = testNet.checked ? NetworkType.TESTNET : NetworkType.MAINNET
stageNet.checked = false;
console.log("Network type set to ", persistentSettings.nettype === NetworkType.TESTNET ? "Testnet" : "Mainnet")
}
}
}
Rectangle {
width: 100 * scaleRatio
CheckBox {
id: stageNet
text: qsTr("Stagenet") + translationManager.emptyString
background: "#FFFFFF"
fontColor: "#4A4646"
fontSize: 16 * scaleRatio
checkedIcon: "../images/checkedVioletIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
checked: appWindow.persistentSettings.nettype === NetworkType.STAGENET;
checked: appWindow.persistentSettings.testnet;
onClicked: {
persistentSettings.nettype = stageNet.checked ? NetworkType.STAGENET : NetworkType.MAINNET
testNet.checked = false;