From 4097c7157ee7a3cdc6861e58cb2555289e956922 Mon Sep 17 00:00:00 2001 From: maitscha Date: Thu, 3 Nov 2016 10:01:32 +0100 Subject: [PATCH] Restyles the wizard's finish page --- wizard/WizardFinish.qml | 46 ++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/wizard/WizardFinish.qml b/wizard/WizardFinish.qml index 7c44b7bc..b7d53971 100644 --- a/wizard/WizardFinish.qml +++ b/wizard/WizardFinish.qml @@ -38,19 +38,37 @@ Item { onOpacityChanged: visible = opacity !== 0 function buildSettingsString() { - var str = "
" + qsTr("Language: ") + wizard.settings['language'] + "
" - + qsTr("Account name: ") + wizard.settings['account_name'] + "
" - + qsTr("Words: ") + wizard.settings['wallet'].seed + "
" - + qsTr("Wallet Path: ") + wizard.settings['wallet_path'] + "
" - + qsTr("Enable auto donation: ") + wizard.settings['auto_donations_enabled'] + "
" - + qsTr("Auto donation amount: ") + wizard.settings['auto_donations_amount'] + "
" - + qsTr("Allow background mining: ") + wizard.settings['allow_background_mining'] + "
" - + qsTr("Daemon address: ") + wizard.settings['daemon_address'] + "
" - + qsTr("testnet: ") + wizard.settings['testnet'] + "
" - + (wizard.settings['restore_height'] === undefined ? "" : qsTr("Restore height: ") + wizard.settings['restore_height']) + "
" - + translationManager.emptyString - return str; + var trStart = '', + trMiddle = '', + trEnd = "", + autoDonationEnabled = wizard.settings['auto_donations_enabled'] === true, + autoDonationText = autoDonationEnabled ? qsTr("Enabled") : qsTr("Disabled"), + autoDonationAmount = wizard.settings["auto_donations_amount"] + " %", + backgroundMiningEnabled = wizard.settings["allow_background_mining"] === true, + backgroundMiningText = backgroundMiningEnabled ? qsTr("Enabled") : qsTr("Disabled"), + testnetEnabled = wizard.settings['testnet'] === true, + testnetText = testnetEnabled ? qsTr("Enabled") : qsTr("Disabled"), + restoreHeightEnabled = wizard.settings['restore_height'] !== undefined; + + return "" + + trStart + qsTr("Language") + trMiddle + wizard.settings["language"] + trEnd + + trStart + qsTr("Account name") + trMiddle + wizard.settings["account_name"] + trEnd + + trStart + qsTr("Words") + trMiddle + wizard.settings["wallet"].seed + trEnd + + trStart + qsTr("Wallet path") + trMiddle + wizard.settings["wallet_path"] + trEnd + + trStart + qsTr("Auto donations") + trMiddle + autoDonationText + trEnd + + (autoDonationEnabled + ? trStart + qsTr("Donation amount") + trMiddle + autoDonationAmount + trEnd + : "") + + trStart + qsTr("Background mining") + trMiddle + backgroundMiningText + trEnd + + trStart + qsTr("Daemon address") + trMiddle + wizard.settings["daemon_address"] + trEnd + + trStart + qsTr("Testnet") + trMiddle + testnetText + trEnd + + (restoreHeightEnabled + ? trStart + qsTr("Restore height") + trMiddle + wizard.settings['restore_height'] + trEnd + : "") + + "
" + + translationManager.emptyString; } + function updateSettingsSummary() { settingsText.text = qsTr("An overview of your Monero configuration is below:") + translationManager.emptyString + "
" @@ -115,10 +133,10 @@ Item { anchors.left: parent.left anchors.right: parent.right font.family: "Arial" - font.pixelSize: 18 + font.pixelSize: 16 wrapMode: Text.Wrap textFormat: Text.RichText - horizontalAlignment: Text.AlignHCenter + horizontalAlignment: Text.AlignHLeft //renderType: Text.NativeRendering color: "#4A4646" }