diff options
Diffstat (limited to 'wizard/WizardOptions.qml')
| -rw-r--r-- | wizard/WizardOptions.qml | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/wizard/WizardOptions.qml b/wizard/WizardOptions.qml index 784c1968..7a9ffa62 100644 --- a/wizard/WizardOptions.qml +++ b/wizard/WizardOptions.qml @@ -29,6 +29,7 @@ import QtQuick 2.2 import QtQml 2.2 import QtQuick.Layouts 1.1 +import moneroComponents.NetworkType 1.0 import "../components" ColumnLayout { @@ -231,12 +232,13 @@ ColumnLayout { } - RowLayout { + ColumnLayout { Layout.leftMargin: wizardLeftMargin Layout.rightMargin: wizardRightMargin Layout.topMargin: 30 * scaleRatio Layout.alignment: Qt.AlignCenter Layout.fillWidth: true + spacing: 50 * scaleRatio Rectangle { width: 100 * scaleRatio @@ -248,10 +250,30 @@ ColumnLayout { fontSize: 16 * scaleRatio checkedIcon: "../images/checkedVioletIcon.png" uncheckedIcon: "../images/uncheckedIcon.png" - checked: appWindow.persistentSettings.testnet; + 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; onClicked: { - persistentSettings.testnet = testNet.checked - console.log("testnet set to ", persistentSettings.testnet) + persistentSettings.nettype = stageNet.checked ? NetworkType.STAGENET : NetworkType.MAINNET + testNet.checked = false; + console.log("Network type set to ", persistentSettings.nettype === NetworkType.STAGENET ? "Stagenet" : "Mainnet") } } } |
