From af9e4e86f0bb4f63fbf516fd5b984a58668495a8 Mon Sep 17 00:00:00 2001 From: Sander Ferdinand Date: Thu, 7 Dec 2017 16:35:42 +0100 Subject: [PATCH] Replacing checkbox, using default values from component --- components/CheckBox.qml | 2 +- pages/History.qml | 2 -- pages/Mining.qml | 4 ---- pages/Transfer.qml | 9 --------- qml.qrc | 1 + wizard/WizardConfigure.qml | 6 ------ wizard/WizardDaemonSettings.qml | 4 ---- wizard/WizardDonation.qml | 4 ---- wizard/WizardOptions.qml | 23 +---------------------- 9 files changed, 3 insertions(+), 52 deletions(-) diff --git a/components/CheckBox.qml b/components/CheckBox.qml index 4ca687b4..8486eedc 100644 --- a/components/CheckBox.qml +++ b/components/CheckBox.qml @@ -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 diff --git a/pages/History.qml b/pages/History.qml index 5ea27ca7..1642f3bc 100644 --- a/pages/History.qml +++ b/pages/History.qml @@ -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 }) diff --git a/pages/Mining.qml b/pages/Mining.qml index 0f0b370b..be2b1805 100644 --- a/pages/Mining.qml +++ b/pages/Mining.qml @@ -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" } } diff --git a/pages/Transfer.qml b/pages/Transfer.qml index 83e6d0a2..7296d190 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -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" } } diff --git a/qml.qrc b/qml.qrc index 8155a77d..18aa7da3 100644 --- a/qml.qrc +++ b/qml.qrc @@ -191,5 +191,6 @@ images/lightning-white.png images/middlePanelBg.jpg components/InputMulti.qml + images/checkedIcon-black.png diff --git a/wizard/WizardConfigure.qml b/wizard/WizardConfigure.qml index 88d10a31..c7184f95 100644 --- a/wizard/WizardConfigure.qml +++ b/wizard/WizardConfigure.qml @@ -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 } diff --git a/wizard/WizardDaemonSettings.qml b/wizard/WizardDaemonSettings.qml index ca15fc44..419e3cd5 100644 --- a/wizard/WizardDaemonSettings.qml +++ b/wizard/WizardDaemonSettings.qml @@ -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 diff --git a/wizard/WizardDonation.qml b/wizard/WizardDonation.qml index 1fccbebb..a5ebb6cc 100644 --- a/wizard/WizardDonation.qml +++ b/wizard/WizardDonation.qml @@ -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 } diff --git a/wizard/WizardOptions.qml b/wizard/WizardOptions.qml index 7a9ffa62..d0e6b930 100644 --- a/wizard/WizardOptions.qml +++ b/wizard/WizardOptions.qml @@ -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;